summaryrefslogtreecommitdiffhomepage
path: root/src/rcamera.h
diff options
context:
space:
mode:
authorRay <[email protected]>2023-02-15 18:01:42 +0100
committerRay <[email protected]>2023-02-15 18:01:42 +0100
commitf594f14510984c43f38e4296d854a0c88633ad63 (patch)
tree9f803f77c82eaa9177c0135a9ce121c4d4ef50c0 /src/rcamera.h
parent2766835ed432a2ad575635ce338aa1389078cb12 (diff)
downloadraylib-f594f14510984c43f38e4296d854a0c88633ad63.tar.gz
raylib-f594f14510984c43f38e4296d854a0c88633ad63.zip
Reviewed typo and formating
Diffstat (limited to 'src/rcamera.h')
-rw-r--r--src/rcamera.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/rcamera.h b/src/rcamera.h
index edcd5ee3..9aab3a34 100644
--- a/src/rcamera.h
+++ b/src/rcamera.h
@@ -423,10 +423,10 @@ void UpdateCamera(Camera *camera, int mode)
if (mode == CAMERA_ORBITAL)
{
// Orbital can just orbit
- Matrix rotatation = MatrixRotate(GetCameraUp(camera), CAMERA_ORBITAL_SPEED*GetFrameTime());
- Vector3 viewVector = Vector3Subtract(camera->position, camera->target);
- viewVector = Vector3Transform(viewVector, rotatation);
- camera->position = Vector3Add(camera->target, viewVector);
+ Matrix rotation = MatrixRotate(GetCameraUp(camera), CAMERA_ORBITAL_SPEED*GetFrameTime());
+ Vector3 view = Vector3Subtract(camera->position, camera->target);
+ view = Vector3Transform(view, rotation);
+ camera->position = Vector3Add(camera->target, view);
}
else
{
@@ -438,8 +438,8 @@ void UpdateCamera(Camera *camera, int mode)
if (IsKeyDown(KEY_Q)) CameraRoll(camera, -CAMERA_ROTATION_SPEED);
if (IsKeyDown(KEY_E)) CameraRoll(camera, CAMERA_ROTATION_SPEED);
- CameraYaw(camera, -mousePositionDelta.x * CAMERA_MOUSE_MOVE_SENSITIVITY, rotateAroundTarget);
- CameraPitch(camera, -mousePositionDelta.y * CAMERA_MOUSE_MOVE_SENSITIVITY, lockView, rotateAroundTarget, rotateUp);
+ CameraYaw(camera, -mousePositionDelta.x*CAMERA_MOUSE_MOVE_SENSITIVITY, rotateAroundTarget);
+ CameraPitch(camera, -mousePositionDelta.y*CAMERA_MOUSE_MOVE_SENSITIVITY, lockView, rotateAroundTarget, rotateUp);
// Camera movement
if (IsKeyDown(KEY_W)) CameraMoveForward(camera, CAMERA_MOVE_SPEED, moveInWorldPlane);