Advanced Camera Rotation

So i am working on a simple 3rd person character controller and i’ve got the basics almost done.57511-2015-11-03-20-41-49-unity-personal-64bit-1unity-le.png

i can rotate him around with my left analog stick but he does’nt rotate around his own axis. I basically set the rotation of the player to the angle of the analog stick

float xAxis = Input.GetAxis ("Horizontal Joystick");
float yAxis = Input.GetAxis("Vertical Joystick");

float angle = Mathf.Atan2 (xAxis, yAxis) * Mathf.Rad2Deg;

transform.rotation = Quaternion.Euler(0,angle,0);

so my question is now: Because the angle of the analogstick does’nt change with the camera, is there some way to make it happen?

If my camera is in this position like it is in the picture, is it possible if i press the analog stick up, to change the rotation according to the camera?


I really suck at explaining things. Any clue or hint or even the slightest nudge in the right direction is highly appreciated :slight_smile:

Thanks in advance :slight_smile:

You probably don’t want to set the rotation quaternion directly. Why not use transform.Rotate instead?