Closed jeffaroundtheworld closed 7 months ago
Here is one way to do it which is in the code I'm working on for the player.
$CameraPivot.rotation.x -= event.relative.y / sensitivity $CameraPivot.rotation.x = clamp($CameraPivot.rotation.x, deg_to_rad(upLook_limit), deg_to_rad(downLook_limit))
Current mechanic allows player to loop 360 when looking up and down.
Find a way to limit vertical "looking".... investigate the use of the clamp() function?