mirror of
https://github.com/raysan5/raylib.git
synced 2026-01-11 22:18:54 +01:00
Update core_3d_camera_fps.c
This commit is contained in:
@ -261,8 +261,7 @@ static void UpdateCameraFPS(Camera *camera)
|
|||||||
Vector3 right = Vector3Normalize(Vector3CrossProduct(yaw, up));
|
Vector3 right = Vector3Normalize(Vector3CrossProduct(yaw, up));
|
||||||
|
|
||||||
// Rotate view vector around right axis
|
// Rotate view vector around right axis
|
||||||
float pitchAngle = -lookRotation.y -
|
float pitchAngle = -lookRotation.y - lean.y;
|
||||||
lean.y;
|
|
||||||
pitchAngle = Clamp(pitchAngle, -PI/2 + 0.0001f, PI/2 - 0.0001f); // Clamp angle so it doesn't go past straight up or straight down
|
pitchAngle = Clamp(pitchAngle, -PI/2 + 0.0001f, PI/2 - 0.0001f); // Clamp angle so it doesn't go past straight up or straight down
|
||||||
Vector3 pitch = Vector3RotateByAxisAngle(yaw, right, pitchAngle);
|
Vector3 pitch = Vector3RotateByAxisAngle(yaw, right, pitchAngle);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user