瀏覽代碼

Update core_3d_camera_fps.c

Ray 5 天之前
父節點
當前提交
28ce99b539
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      examples/core/core_3d_camera_fps.c

+ 1 - 2
examples/core/core_3d_camera_fps.c

@@ -261,8 +261,7 @@ static void UpdateCameraFPS(Camera *camera)
     Vector3 right = Vector3Normalize(Vector3CrossProduct(yaw, up));
 
     // Rotate view vector around right axis
-    float pitchAngle = -lookRotation.y - 
-    lean.y;
+    float pitchAngle = -lookRotation.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
     Vector3 pitch = Vector3RotateByAxisAngle(yaw, right, pitchAngle);