AutoCamLocomotionController
A class in Root.Township, the global namespace.
Locomotion for the AutoCam spectator camera: orbits slowly around a focused player and frames every player near them, with keyboard controls. Local player only.
Constructors
| Member | What it is |
|---|
AutoCamLocomotionController() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
3 private and internal fields
| Member | What it is |
|---|
private float currentRotation | Current orbit angle in radians, increased by the rotation speed each frame. |
private int focus | Index of the player being followed. |
private List<AutoCamLocomotionController.AutoCamTarget> targets | Player body transforms gathered this frame, with whether each is close enough to the focus to be framed. |
Properties
1 private and internal property
| Member | What it is |
|---|
private AutoCamPlayer PlayerController { get; } | The controller as an AutoCamPlayer, which holds the framing settings. |
Methods
1 private and internal method
| Member | What it is |
|---|
private void LateUpdate() | Collects all player bodies, handles keys (arrows change focus, PageUp/PageDown zoom, Home/End orbit speed, Backspace cursor) and lerps the camera to frame them. |