- Home /
Change movement speed based on rotation
I am trying to create a function that adjusts the players movement speed, based upon the rate of change of rotation. If the player is looking around (rotating) a lot then the speed should be heavily reduced whereas infrequent rotations should not have much effect. The speed adjustment to be proportionate to the frequency of looking around, i.e the more your look around, the slower you go and the less you look, the less your speed is reduced. The minimum speed would be around 0.2 and the maximum around 1. I would like to be able to set a threshold, i.e the change in rotation has to be more than this amount before your speed is modified, in the inspector.
Your answer
Follow this Question
Related Questions
Rotation used as movement 4 Answers
Accelerating in Turned Direction 2 Answers
Prevent Rigidbody From Rotating 3 Answers
Rotating my character only while moving in a 2D plane 3 Answers
CONTROL RIGIDBODY MOVEMENT 2 Answers