Change rotation (y value) of the FirstPersonPlayerController

Instead of invisible walls i wanted to teleport the player back to a specific point on the map.

So I created a wall as a trigger and added a script:

public class Teleport : MonoBehaviour {
public Transform destination;
void OnTriggerEnter(Collider other) { 

    GameObject.FindGameObjectWithTag("Player").transform.position = destination.position;
    GameObject.FindGameObjectWithTag ("Player").transform.eulerAngles = transform.rotation; 

The problem is: the camera rotation doesn’t change. After the teleport i keep looking in the same direction as before.

How can i change the camera rotation to a specific y-value?

Try this:

Camera.main.transform.rotation = Quaternion.Euler(x,y,z);

Where x,y,z are the new values you want for rotation