make yaw = 0 result in (0, 0, 1) target vector
This commit is contained in:
parent
87b33c2e0c
commit
7284bb726a
@ -454,8 +454,9 @@ DrawCameraFromPrincipalAxesResult draw_camera_from_principal_axes(Vec3 position,
|
|||||||
|
|
||||||
(void)roll;
|
(void)roll;
|
||||||
|
|
||||||
|
/* rotate so that yaw = 0 results in (0, 0, 1) target vector */
|
||||||
float yawc, yaws, pitchc, pitchs;
|
float yawc, yaws, pitchc, pitchs;
|
||||||
sincosf(yaw, &yaws, &yawc);
|
sincosf(yaw + (float)M_PI, &yaws, &yawc);
|
||||||
sincosf(pitch, &pitchs, &pitchc);
|
sincosf(pitch, &pitchs, &pitchc);
|
||||||
|
|
||||||
Camera const camera = {
|
Camera const camera = {
|
||||||
|
Loading…
Reference in New Issue
Block a user