- Home /
Mouse Orbit Script with mecanim & turning character
Hello! At start: sorry for my english but I'm a random noob from Poland :P I need help with enchanting Mouse Orbit Script. My game character should rotate with camera only when he walking/jogging. I want make effect like in Devil May Cry or Assassin's Creed. When I move camera to left and push "W" button my characters should be back to me. This is FRAGMENT of my code (it works but have a mistakes):
var rot : Quaternion = cam.rotation;
var cam : Transform;
function Update ()
{
if(walk > 0)
{
transform.rotation.y = rot.y;
}
}
Comment
Your answer
Follow this Question
Related Questions
Curve player movement 1 Answer
2.5D Mobile joystick rotation problem 0 Answers
Rigidbody.AddForce and incorrect rotation 2 Answers
Rotate when the objekt reaches a Point 0 Answers
Camera rotates around player but player movement is incorrect 1 Answer