- Home /
How to get players rotation for camera 3rd person
Hi all,
I am having a little issue with my right click free camera.
when i hold my right mouse button down I am able to move the camera around and when I let go it moves back behind the player as it should. The problem I have is if I rotate the player around and then right click, it goes from 0 in rotation which means it snaps to a weird position to the player.
How can I get the rotation information so when I right click it gets the rotation and uses it to stop the camera snap?
Thanks,
Doomie22
Can't you just set camera.rotation = player.rotation when you set the camera back behind the player?
You could also use multiple cameras and enable/disable them.
Answer by doomie22 · Jun 28, 2012 at 10:45 PM
Sorry i am a little new to Unity, how would I do this in c# as I cannot seem to find the rotations in the commands list.