aki
0
Q:

camera to follow player unity

public Transform player;

    public Vector3 offset;

    void LateUpdate()
    {
        transform.position = player.position + offset;
    }
4
  public Transform player;  public Vector3 offset;    void Update ()   {      transform.position = new Vector3 (player.position.x + offset.x, player.position.y + offset.y, offset.z); // Camera follows the player with specified offset position  }
-1
  public Transform player;
  public Vector3 offset; 

  void Update()
  {
  	transform.position = player.position + offset;
  }
0

New to Communities?

Join the community