Simple follow camera script

i used the roll a ball script :slight_smile:
im not sure i understand that offset part. but it works for me :slight_smile:

1 Like

Offset is just a Vector3 distance (a 3 dimensional distance away) and is how far away the camera should be from the player. It’s calculated at start as the distance between the camera and player so you would need to position the camera at a distance you want it from the player before launching the game. Then each frame update the camera position is set to the player position minus the offset distance, so moves it away from the player the same distance it was at the start hence maintaining the distance.

Very nice. Not sure if we maybe had different camera transforms, but instead of subtracting the offset, I had added it. Nice script either way! :grinning:

Privacy & Terms