File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -106,9 +106,9 @@ int main(void)
106106 {
107107 // Update
108108 //----------------------------------------------------------------------------------
109- Vector2 mouse_delta = GetMouseDelta ();
110- lookRotation .x -= mouse_delta .x * sensitivity .x ;
111- lookRotation .y += mouse_delta .y * sensitivity .y ;
109+ Vector2 mouseDelta = GetMouseDelta ();
110+ lookRotation .x -= mouseDelta .x * sensitivity .x ;
111+ lookRotation .y += mouseDelta .y * sensitivity .y ;
112112
113113 char sideway = (IsKeyDown (KEY_D ) - IsKeyDown (KEY_A ));
114114 char forward = (IsKeyDown (KEY_W ) - IsKeyDown (KEY_S ));
@@ -261,7 +261,8 @@ static void UpdateCameraAngle(Camera *camera)
261261 Vector3 right = Vector3Normalize (Vector3CrossProduct (yaw , up ));
262262
263263 // Rotate view vector around right axis
264- float pitchAngle = - player .body .lookRotation .y - player .lean .y ;
264+ float pitchAngle = - lookRotation .y -
265+ lean .y ;
265266 pitchAngle = Clamp (pitchAngle , - PI / 2 + 0.0001f , PI / 2 - 0.0001f ); // Clamp angle so it doesn't go past straight up or straight down
266267 Vector3 pitch = Vector3RotateByAxisAngle (yaw , right , pitchAngle );
267268
You can’t perform that action at this time.
0 commit comments