- Home /
How to limit the forces applied to an object to just forward, left, and right?
So in the Unity tutorial "Roll a Ball" the video describes how to script the player controls so that each directional key press applies a force to the ball object.
How would you suggest I go about limiting the forces so that the only forces the player can apply to the ball are forward, left, and right? In other words, how would I get rid of the back directional key/force?
Thanks so much!
you would have to always take the absolute value of the vertical input
Your answer
Follow this Question
Related Questions
Movement script breaks colliders 1 Answer
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
A simple solution for constant rigidbody movement without changing and clamping velocity directly 2 Answers
Player movement boudaries in 2D 1 Answer
Strange behavior with the Unity car? 0 Answers