Table of Contents

Class ArenaSpectatorCamera

Namespace
FishMMO.Client
Assembly
FishMMO.Client.dll

A free-flying camera for a game master spectating an arena match.

public sealed class ArenaSpectatorCamera : MonoBehaviour
Inheritance
Object
Component
Behaviour
MonoBehaviour
ArenaSpectatorCamera
Inherited Members
MonoBehaviour.IsInvoking()
MonoBehaviour.CancelInvoke()
MonoBehaviour.StopCoroutine(Coroutine)
MonoBehaviour.StopAllCoroutines()
MonoBehaviour.destroyCancellationToken
MonoBehaviour.useGUILayout
MonoBehaviour.didStart
MonoBehaviour.didAwake
MonoBehaviour.runInEditMode
Behaviour.enabled
Behaviour.isActiveAndEnabled
Component.GetComponent<T>()
Component.TryGetComponent<T>(out T)
Component.GetComponentInChildren<T>()
Component.GetComponentsInChildren<T>()
Component.GetComponentInParent<T>()
Component.GetComponentsInParent<T>()
Component.GetComponents<T>()
Component.GetComponentIndex()
Component.CompareTag(TagHandle)
Component.transform
Component.transformHandle
Component.gameObject
Component.tag
Object.GetEntityId()
Object.GetInstanceID()
Object.GetHashCode()
Object.InstantiateAsync<T>(T)
Object.InstantiateAsync<T>(T, Transform)
Object.InstantiateAsync<T>(T, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion, Transform)
Object.Instantiate(Object)
Object.Instantiate(Object, Scene)
Object.Instantiate<T>(T, InstantiateParameters)
Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
Object.Instantiate(Object, Transform)
Object.Instantiate<T>(T)
Object.Instantiate<T>(T, Vector3, Quaternion)
Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
Object.Instantiate<T>(T, Transform)
Object.Destroy(Object)
Object.DestroyImmediate(Object)
Object.DontDestroyOnLoad(Object)
Object.DestroyObject(Object)
Object.FindObjectsOfType<T>()
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindObjectOfType<T>()
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Object.FindObjectsByType<T>()
Object.FindObjectsByType<T>(FindObjectsInactive)
Object.ToString()
Object.name
Object.hideFlags

Remarks

While Active, the player input controller stops driving the third-person camera and stops moving the spectator's own character, and this component flies the main camera instead: hold the right mouse button to look, WASD to move, Q/E for down and up, Shift for speed. Switching it off simply lets the character camera take the transform back on its next frame; nothing has to be restored.

Client-side only: where a spectator's camera is has no bearing on anything the server tracks. The team registry already reports a spectator as an ally to everyone, so the free camera grants no advantage a seated player could use — the HUD only offers it to a player with no seat in the match.

Fields

FastMultiplier

Multiplier while Shift is held.

public float FastMultiplier

Field Value

float

LookSensitivity

Degrees per pixel of mouse movement.

public float LookSensitivity

Field Value

float

MoveSpeed

Metres per second at the base speed.

public float MoveSpeed

Field Value

float

Properties

Active

Whether a spectator camera is flying the main camera right now.

public static bool Active { get; }

Property Value

bool

Methods

Disable()

Hands the camera back to the character.

public static void Disable()

Enable()

Starts flying the main camera from where it is.

public static void Enable()

Toggle()

public static void Toggle()