Hi! I have this script in my camera for a 3D turn based board game:
public GameObject Player1, Player2;
private Vector3 offset;
void Start () {
offset = transform.position - Player1.transform.position;
offset = transform.position - Player2.transform.position;
}
void LateUpdate()
{
transform.position = Player1.transform.position + offset;
transform.position = Player2.transform.position + offset;
}
It’s ok for one character to follow it around the playfield, but the thing is I want, when it’s turn is over, that the camera starts to follow another character. I don’t know how to do it. I would appreciate any ideas to do that. Thanks!