Camera Follow XZ

< 1 min read

Updated on November 20, 2025

Introduction

This is a simple camera follow used to demonstrate the versatility of the system.

Setting up

Attach this component to a Camera and assign a target to follow.

This is already set up on the PlayerControlled prefab in /prefabs/ControlModes.

Settings

Target
The target to follow.

Follow Speed
How quick to move toward the target.

Camera Centered Position
Keeps the Camera offset by a certain amount. Test out in play mode and copy the values.

Scripting

/// <summary>
/// Assigns a new target for the camera to follow
/// </summary>
/// <param name="newTarget"></param>
public void SetTarget(Transform newTarget)