I have a player and a 3rd person view camera which is controllable by the mouse.
I now want to be able to set the rotation of the player around the Y axis equal to the rotation of the camera around the Y axis.
gameObject.transform.rotation.y = GameObject.Find("Main Camera").transform.rotation.y;. This makes it almost behave as I want it except it only works for 180 degrees. The other 180 degrees the character turns around in the opposite direction.
Does anyone know how I can do this?