Q:

camera follow

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

New to Communities?

Join the community