- Home /
Rotation with Character Controller & Rotation using vector3
So can you rotate the model tied to a character controller by just rotating the controller or do you have to rotate the model inside the controller in order for it to rotate?
Also, I'm using Playstation controller in order to capture inputs. So what should I use in order to rotate the object so it would be facing towards the input the controller gives. So if the input result is (-1,0), I want to rotate the object pointing towards left.
The camera just follows the player from certain point of view and is not rotate during the game.
Thank you in advance.
Answer by EmJay · May 14, 2013 at 05:43 PM
Ok I got it myself. You can set the game object's transform.forward value into the input value from the controller by transform.forward = new Vector3(Vector2.x,0,Vector2.y);
Vector2 is just an example and not to be taken literally. Normally you place your axis input results there. This seems to not rotate the collider itself but it will rotate the model which it has tied into.
Your answer
Follow this Question
Related Questions
character wont rotate and is stuck to the one position. 0 Answers
Character Controller Movement - Different speeds on different axis 1 Answer
Rotate a vector3 to a surface normal? 1 Answer
What is a correct way to move a Drone follow a list of Vector3 points 1 Answer
Rotation of character resets when joystick is released 3 Answers