Fixed rotation angle about y-axis not being halved for quaternion rotation

This commit is contained in:
trotFunky 2019-11-04 15:30:59 +01:00
parent c4a0218d62
commit 10f7963fae

View file

@ -39,7 +39,7 @@ void Camera::rotate(const Vec3d& rotation)
gaze = z_rotation * gaze;
gaze_up = z_rotation * gaze_up;
Quaternion y_rotation{0,sin(rotation.y),0,cos(rotation.y)};
Quaternion y_rotation{0,sin(rotation.y/2),0,cos(rotation.y/2)};
y_rotation.normalize();
gaze = y_rotation * gaze;
gaze_up = y_rotation * gaze_up;