Question on rigidbody character rotating to the degree of input and then moving
Hi there, I'm new to unity and can't find any information regarding particular movement style that I'm looking for.
I would like my character (which is a rigidbody, because I would like it to have momentum and weight) to rotation to the degree of input (e.g pressing "S") will rotate (at a rotation speed variable) the object 180 degrees downward and when it reaches the input rotation, it will add a force to move the object.
Likewise if I input "A" after this, it will stop moving (but keep any downward momentum it may have gained) and rotate 90 degrees clockwise and when it reaches the 270 degree mark and "A" is still the input, it will move in that direction, but if the input is let go of the rigidbody will stop mid-rotation (e.g if at 235 degrees, I let go of "A" in the example) the rigidbody will stop rotating and be idle (no movement unless it currently has momentum).
So essentially the character will move only when it's facing input direction (which will have a small delay to get to it due to the rotation speed variable) but I'm not sure how to accomplish this, any help would be very appreciated!
Thank you very much for your time. (C#)
Your answer
Follow this Question
Related Questions
moving an object continuously between waypoints 0 Answers
Smooth Rotation on WASD keys pressed? 1 Answer
Issue with wave-like motion when rotating with mouse input 0 Answers
How to access y rotation of an object as a variable or value 1 Answer
How do you change your z axis in a movement script. 1 Answer