Skip to content

Commit

Permalink
Merge pull request #48 from ersh1/master
Browse files Browse the repository at this point in the history
Compatibility fix for True Directional Movement
mwilsnd authored Jun 18, 2021
2 parents 7d3ca33 + f08617a commit 85dbf7e
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions SmoothCam/source/camera.cpp
Original file line number Diff line number Diff line change
@@ -875,17 +875,18 @@ glm::vec2 Camera::SmoothCamera::GetAimRotation(const TESObjectREFR* ref, const C
rotation.euler.x,
yaw + clampedLocal
};

} else if (GameState::InPOVSlideMode()) {
// In POV slide mode aim yaw is locked to player rotation
return {
rotation.euler.x,
ref->rot.z
};

} else {
return rotation.euler;
const auto tps = reinterpret_cast<const CorrectedThirdPersonState*>(camera->cameraStates[CorrectedPlayerCamera::kCameraState_ThirdPerson2]);
if (tps && tps->freeRotationEnabled) {
// In free rotation mode aim yaw is locked to player rotation
return {
rotation.euler.x,
ref->rot.z
};
}
}

return rotation.euler;
}

const mmath::Rotation& Camera::SmoothCamera::GetCameraRotation() const noexcept {

0 comments on commit 85dbf7e

Please sign in to comment.