summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorPixel Phobic <[email protected]>2023-06-02 01:29:45 -0700
committerGitHub <[email protected]>2023-06-02 10:29:45 +0200
commitb1b6ae3905512cbe3b39ad37109a494c10f5ca32 (patch)
treef3040ff5b9a93164f86ef27352c4c4a514a6270d /src
parent2dec56e7b772ce4734f415e03715d0712ae68b8a (diff)
downloadraylib-b1b6ae3905512cbe3b39ad37109a494c10f5ca32.tar.gz
raylib-b1b6ae3905512cbe3b39ad37109a494c10f5ca32.zip
Full Movement Added to Right Analog Stick (#3095)
I Added Analog Stick Support to the rcamera module, However this code only allowed for 4 Directions of Movement, This Changed adds the full range of Movement to the Right Analog Stick.
Diffstat (limited to 'src')
-rw-r--r--src/rcamera.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rcamera.h b/src/rcamera.h
index c1b048e0..2a20d581 100644
--- a/src/rcamera.h
+++ b/src/rcamera.h
@@ -465,10 +465,10 @@ void UpdateCamera(Camera *camera, int mode)
CameraYaw(camera, -(GetGamepadAxisMovement(0, GAMEPAD_AXIS_RIGHT_X) * 2)*CAMERA_MOUSE_MOVE_SENSITIVITY, rotateAroundTarget);
CameraPitch(camera, -(GetGamepadAxisMovement(0, GAMEPAD_AXIS_RIGHT_Y) * 2)*CAMERA_MOUSE_MOVE_SENSITIVITY, lockView, rotateAroundTarget, rotateUp);
- if (GetGamepadAxisMovement(0, GAMEPAD_AXIS_LEFT_Y) <= -0.75f) CameraMoveForward(camera, CAMERA_MOVE_SPEED, moveInWorldPlane);
- if (GetGamepadAxisMovement(0, GAMEPAD_AXIS_LEFT_X) <= -0.75f) CameraMoveRight(camera, -CAMERA_MOVE_SPEED, moveInWorldPlane);
- if (GetGamepadAxisMovement(0, GAMEPAD_AXIS_LEFT_Y) >= 0.75f) CameraMoveForward(camera, -CAMERA_MOVE_SPEED, moveInWorldPlane);
- if (GetGamepadAxisMovement(0, GAMEPAD_AXIS_LEFT_X) >= 0.75f) CameraMoveRight(camera, CAMERA_MOVE_SPEED, moveInWorldPlane);
+ if (GetGamepadAxisMovement(0, GAMEPAD_AXIS_LEFT_Y) <= -0.25f) CameraMoveForward(camera, CAMERA_MOVE_SPEED, moveInWorldPlane);
+ if (GetGamepadAxisMovement(0, GAMEPAD_AXIS_LEFT_X) <= -0.25f) CameraMoveRight(camera, -CAMERA_MOVE_SPEED, moveInWorldPlane);
+ if (GetGamepadAxisMovement(0, GAMEPAD_AXIS_LEFT_Y) >= 0.25f) CameraMoveForward(camera, -CAMERA_MOVE_SPEED, moveInWorldPlane);
+ if (GetGamepadAxisMovement(0, GAMEPAD_AXIS_LEFT_X) >= 0.25f) CameraMoveRight(camera, CAMERA_MOVE_SPEED, moveInWorldPlane);
}
//if (IsKeyDown(KEY_SPACE)) CameraMoveUp(camera, CAMERA_MOVE_SPEED);