Top-Down Movement and Rotation Toward Joystick Direction
Hey Everyone,
I'm working on movement of a 3D cube moving along the x and z axes. I want to have the cube orientate/rotate itself toward the direction given by my horizontal and vertical axes. I also want the cube to move in the direction that it is facing. IE: When I move the joystick up and to the right, I want the cube to rotate (over time) toward where the joystick is pointing, and I want the cube to begin to move in whatever direction it is facing.
This is a fast-paced game, so I'm ok with the cube moving before rotation finishes, and I'm not too worried about the where the camera is positioned, since I have set it up to be looking in front of the cube, aligned to the z-axis.
I have tried a number of scripts and searched through nearly every post I could find, to no avail. Any direction on this would be most appreciated!
Thanks!
Additional Notes: If it's relevant, I'm writing in C# using Unity 2017.3, on Windows 10. The game is 3D, but the movement is along one plan, so it remains to be more-or-less 2D movement.
Your answer
Follow this Question
Related Questions
Rotate player 0 Answers
Rotation and movement of a rolling sphere 0 Answers
How do you make character keep moving after key is pressed 0 Answers
How to limit the rotation speed of my player 0 Answers
Character Rotation 0 Answers