Make first person camera movement not reliant on framerate

This commit is contained in:
YSU 2021-06-12 10:36:18 -06:00 committed by GitHub
parent ae9cea03f0
commit 9d48a2d8da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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