Fixed rotation angle about y-axis not being halved for quaternion rotation
This commit is contained in:
parent
c4a0218d62
commit
10f7963fae
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue