From 9d48a2d8da9315d0dc9c4eeb6f57d460a0336723 Mon Sep 17 00:00:00 2001 From: YSU <60752325+Y5U@users.noreply.github.com> Date: Sat, 12 Jun 2021 10:36:18 -0600 Subject: [PATCH] Make first person camera movement not reliant on framerate --- src/camera.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/camera.h b/src/camera.h index 35eda8310..5eb17ffd4 100644 --- a/src/camera.h +++ b/src/camera.h @@ -171,8 +171,8 @@ void SetCameraMoveControls(int keyFront, int keyBack, #define CAMERA_FIRST_PERSON_MAX_CLAMP -89.0f #define CAMERA_FIRST_PERSON_STEP_TRIGONOMETRIC_DIVIDER 8.0f -#define CAMERA_FIRST_PERSON_STEP_DIVIDER 30.0f -#define CAMERA_FIRST_PERSON_WAVING_DIVIDER 200.0f +#define CAMERA_FIRST_PERSON_STEP_DIVIDER 3.0f * GetFrameTime() +#define CAMERA_FIRST_PERSON_WAVING_DIVIDER 20.0f * GetFrameTime() // THIRD_PERSON //#define CAMERA_THIRD_PERSON_MOUSE_SENSITIVITY 0.003f @@ -182,7 +182,7 @@ void SetCameraMoveControls(int keyFront, int keyBack, #define CAMERA_THIRD_PERSON_OFFSET (Vector3){ 0.4f, 0.0f, 0.0f } // PLAYER (used by camera) -#define PLAYER_MOVEMENT_SENSITIVITY 20.0f +#define PLAYER_MOVEMENT_SENSITIVITY 1.0f * (GetFrameTime() * 10) //---------------------------------------------------------------------------------- // Types and Structures Definition