0

I have 2 cameras attached to my standard asset Third Person Controller in my scene, the standard main camera that orbits around the character(player) and a secondary over the shoulder camera that gets activated when the right mouse button is pressed.

So far I'm able to switch between cameras easily but my problem is getting the player to face the secondary camera's facing direction when it is activated and continue to face the secondary camera's facing direction while the right mouse button is pressed.

I'd like the player to turn towards the secondary camera's forward direction.

1 Answers1

1

You can set the player transform.forward vector to the transform.forward vector of the second camera.

Also, maybe you it would feel better to raycast from the second camera and set the transform.LookAt() of the player to the raycast hit position.

Daahrien
  • 10,190
  • 6
  • 39
  • 71
  • While your answer practically did what I needed it does it in an instantaneous fashion with no smoothness at all, also the transform.forward Vector3 seems to take on the other rotations of the camera and puts my player at all 3 rotations of the Vector3 resulting in a tilted player. – Jeremy Womack Jan 22 '18 at 19:48