- Home /
Gradual Rotation of Character from 2 Axis Input Sources
Hi all,
I'm wanting to use two sticks to control a character. Vertical/Horizontal controls the movement, RightVertical/RightHorizontal control the aiming. When the player isn't using the aiming stick, the character should face the direction they're running.
I got it working fine using:
Player.transform.LookAt(Player.transform.position +
Vector3(LookVector.x, 0, LookVector.z));
But I want the character to rotate to the new direction, rather than snapping. I've read through a number of threads that have solutions to similar problems, but the closest I can get is a slow rotation in one direction like it can't snap over to the other side, and as soon as I move with the left stick it breaks.
Given that LookVector is applied by the right joysticks horizontal/vertical input, or left (movement) if the right is free, anyone have any ideas on how to slowly LookAt() rather than snap to?
Your answer
Follow this Question
Related Questions
A little help with this camera script please? 3 Answers
How can I make an object move up on collision? 1 Answer
Finding A Rigidbody's Rotation Speed And Direction 2 Answers
Ball Rolling Animation Not Working Properly 0 Answers
Creating Hint Vector 1 Answer