Table of Contents

Class ClientCameraSettings

Namespace
FishMMO.Client
Assembly
FishMMO.Client.dll

Camera preferences the player owns: how far the mouse turns the view, and how its edges are smoothed.

public static class ClientCameraSettings
Inheritance
ClientCameraSettings
Inherited Members

Remarks

Separate from ClientDisplaySettings because it writes to a scene object rather than to Unity's global state, and that object does not exist for the whole session. The camera lives in ClientPreboot and is picked up by KCCPlayer when it takes ownership, so a value applied at boot has to survive until then — it does, because RotationSpeed is a plain field on a component that outlives the scene loads between boot and play.

Sensitivity only has an observable effect while the cursor is locked, which is the state the mouse drives the camera in. With mouse mode on the cursor is free and the camera does not turn at all, so the slider looks broken if tested there — it is not, there is simply no look input to scale.

Fields

DefaultAntialiasing

Edge smoothing when nothing has been chosen.

public const ClientCameraSettings.AntialiasingOption DefaultAntialiasing = Balanced

Field Value

ClientCameraSettings.AntialiasingOption

Remarks

SMAA rather than Off. The camera ships with antialiasing disabled, which is what made character silhouettes visibly stair-stepped; a default that looks broken is a poor one. Chosen over FXAA because it keeps texture detail instead of softening the whole frame, and over TAA because TAA ghosts on a camera that orbits the player.

DefaultFieldOfView

Vertical field of view when nothing has been chosen: what ClientPreboot's camera is authored with.

public const float DefaultFieldOfView = 60

Field Value

float

DefaultLookSensitivity

Sensitivity when nothing has been chosen.

public const float DefaultLookSensitivity = 2

Field Value

float

Remarks

Two on the scale described at MouseDegreesPerCount: about 13 inches of mouse for a full turn at 800 DPI, a moderate setting.

DefaultMaxZoom

Farthest the third-person view zooms out when nothing has been chosen: the authored camera's.

public const float DefaultMaxZoom = 10

Field Value

float

DefaultShoulderHeight

Height of the over-the-shoulder view above the follow point when nothing has been chosen.

public const float DefaultShoulderHeight = 0.2

Field Value

float

DefaultShoulderMaxZoom

Farthest the over-the-shoulder view zooms out when nothing has been chosen: the authored camera's.

public const float DefaultShoulderMaxZoom = 4

Field Value

float

DefaultShoulderOffset

Sideways distance of the over-the-shoulder view when nothing has been chosen.

public const float DefaultShoulderOffset = 0.55

Field Value

float

DefaultStyle

The camera style when nothing has been chosen: the original centred camera.

public const KCCCameraStyle DefaultStyle = ThirdPerson

Field Value

KCCCameraStyle

DefaultZoomStep

Metres one notch of the wheel moves the view when nothing has been chosen: the authored camera's.

public const float DefaultZoomStep = 0.5

Field Value

float

MaximumFieldOfView

Widest field of view offered, degrees (vertical; about 121 across at 16:9).

public const float MaximumFieldOfView = 90

Field Value

float

MaximumLookSensitivity

Fastest the view may turn: wide enough for any value a player brings from another game.

public const float MaximumLookSensitivity = 20

Field Value

float

MaximumMaxZoom

Highest the third-person zoom limit may be set: double the authored one.

public const float MaximumMaxZoom = 20

Field Value

float

MaximumShoulderHeight

Highest the over-the-shoulder view may sit.

public const float MaximumShoulderHeight = 0.6

Field Value

float

MaximumShoulderMaxZoom

Highest the over-the-shoulder zoom limit may be set: double the authored one.

public const float MaximumShoulderMaxZoom = 8

Field Value

float

MaximumShoulderOffset

Most sideways distance offered. The pivot is also held to MaxShoulderReach.

public const float MaximumShoulderOffset = 0.9

Field Value

float

MaximumZoomStep

Largest zoom step offered.

public const float MaximumZoomStep = 2

Field Value

float

MinimumFieldOfView

Narrowest field of view offered, degrees (vertical).

public const float MinimumFieldOfView = 50

Field Value

float

MinimumLookSensitivity

Slowest the view may turn. Above zero: zero is a camera that cannot be moved.

public const float MinimumLookSensitivity = 0.05

Field Value

float

MinimumMaxZoom

Lowest the third-person zoom limit may be set.

public const float MinimumMaxZoom = 2

Field Value

float

MinimumShoulderHeight

Lowest the over-the-shoulder view may sit, below the follow point.

public const float MinimumShoulderHeight = -0.3

Field Value

float

MinimumShoulderMaxZoom

Lowest the over-the-shoulder zoom limit may be set.

public const float MinimumShoulderMaxZoom = 2

Field Value

float

MinimumShoulderOffset

Least sideways distance offered: any less is third person with a nearer camera.

public const float MinimumShoulderOffset = 0.2

Field Value

float

MinimumZoomStep

Smallest zoom step offered.

public const float MinimumZoomStep = 0.1

Field Value

float

ShoulderSideLabels

Labels for the shoulder dropdown: index 0 is the right shoulder, 1 the left, as stored.

public static readonly string[] ShoulderSideLabels

Field Value

string[]

StyleLabels

Labels for StyleOrder, index for index.

public static readonly string[] StyleLabels

Field Value

string[]

StyleOrder

The styles in the order the Options dropdown lists them. The stored value is the enum's, not this index.

public static readonly KCCCameraStyle[] StyleOrder

Field Value

KCCCameraStyle[]

Properties

FieldOfView

Vertical field of view, degrees.

public static float FieldOfView { get; }

Property Value

float

InvertX

Sideways look input reversed.

public static bool InvertX { get; }

Property Value

bool

InvertY

Vertical look input reversed.

public static bool InvertY { get; }

Property Value

bool

LookSensitivity

The sensitivity in effect, clamped. Read every frame by the look input.

public static float LookSensitivity { get; }

Property Value

float

MaxZoom

Farthest the wheel takes the third-person view, metres.

public static float MaxZoom { get; }

Property Value

float

MouseDegreesPerCount

Degrees the view turns for one count of mouse movement: sensitivity × 0.022.

public static float MouseDegreesPerCount { get; }

Property Value

float

Remarks

The common mouse-look scale, so the same number turns the view by the same amount for the same movement of the mouse. Nothing is scaled by frame time, and the counts come in raw (the browser is asked for unaccelerated movement, see PointerLockGuard.jslib).

Not scaled by the field of view. It was, by tan(fov/2) against a 73.74-degree reference, to keep the picture moving the same at any view: at the camera's 60 degrees that turned 23% less per count than the same number elsewhere, and a player's usual sensitivity felt slow (2026-11-11), so the scale is the plain one.

ShoulderHeight

How far above the follow point the over-the-shoulder view sits, metres.

public static float ShoulderHeight { get; }

Property Value

float

ShoulderLeft

The over-the-shoulder view looks past the left shoulder.

public static bool ShoulderLeft { get; }

Property Value

bool

ShoulderMaxZoom

Farthest the wheel takes the over-the-shoulder view, metres.

public static float ShoulderMaxZoom { get; }

Property Value

float

ShoulderOffset

How far to the side of the character the over-the-shoulder view sits, metres.

public static float ShoulderOffset { get; }

Property Value

float

StickDegreesPerSecondAtFullDeflection

Degrees a second the view turns at full deflection of a stick.

public static float StickDegreesPerSecondAtFullDeflection { get; }

Property Value

float

Remarks

A stick reports a position, not a movement, so unlike the mouse this is a rate, scaled by frame time.

Style

The camera style in effect.

public static KCCCameraStyle Style { get; }

Property Value

KCCCameraStyle

ZoomStep

Metres one notch of the wheel moves the view.

public static float ZoomStep { get; }

Property Value

float

Methods

ApplyAntialiasing(AntialiasingOption)

Writes an antialiasing mode onto the camera.

public static bool ApplyAntialiasing(ClientCameraSettings.AntialiasingOption option)

Parameters

option ClientCameraSettings.AntialiasingOption

The mode to apply. An unrecognised value falls back to the default.

Returns

bool

true if a camera received it; false if there is none yet.

ApplyLookSensitivity(float)

Sets the look sensitivity, and puts the camera into degrees.

public static bool ApplyLookSensitivity(float value)

Parameters

value float

The sensitivity. Clamped to the supported range.

Returns

bool

true if a camera was found and set to take degrees; false if there is none yet.

Remarks

Clamped rather than trusted. The value is a float in a text file the player can edit, and it scales raw mouse movement: a large one makes the view unusable at exactly the moment the player would need to reach the menu to put it back, and zero makes the camera immovable.

The look input now arrives at the camera already in degrees (PlayerInputController converts counts with MouseDegreesPerCount), so the camera's own RotationSpeed multiplier is held at 1 rather than carrying the sensitivity.

ApplySaved()

Applies the stored look sensitivity.

public static void ApplySaved()

Remarks

Reports what it did, at Debug. Only this path logs: ApplyLookSensitivity is also called for every value change while the player drags the slider, which would be pure noise.

ApplySavedAntialiasing()

Applies the stored antialiasing mode to the live camera.

public static void ApplySavedAntialiasing()

ApplyStyle(KCCCameraStyle)

Puts a style into effect on the camera, if there is one yet.

public static bool ApplyStyle(KCCCameraStyle style)

Parameters

style KCCCameraStyle

Returns

bool

true if a camera received it.

Remarks

Held here as well as on the camera: boot applies settings before the world camera is picked up, and PlayerInputController applies them again once it is (see ApplySaved()).

ApplyView()

Puts every view setting onto the camera, if there is one yet.

public static bool ApplyView()

Returns

bool

true if a camera received them.

Remarks

Plain fields on the camera. The zoom limits need no more than that: the camera clamps its zoom to the limit every update, so lowering the limit below the current zoom eases the view in rather than jumping it.

LoadSaved()

The saved sensitivity, carrying over one stored under the old meaning.

public static float LoadSaved()

Returns

float

Remarks

The setting used to be the degrees turned per count outright (0.1 to 1, default 0.5), stored under LegacyLookSensitivityKey. It is converted once into the sensitivity that turns the same amount per count, so nobody's view changes speed under them except where the old value lies past the new maximum; the old key is then removed.

LoadSavedStyle()

The saved style, or the default for a missing or unknown value (the file is the player's to edit).

public static KCCCameraStyle LoadSavedStyle()

Returns

KCCCameraStyle

LoadSavedView()

Reads every view setting from the file, clamped: the file is the player's to edit, and an out-of-range zoom or field of view would otherwise reach the camera as it stands.

public static void LoadSavedView()

ResetView()

Puts every view setting back to its default, saved and applied.

public static void ResetView()

SetFieldOfView(float)

Saves and applies the field of view.

public static void SetFieldOfView(float value)

Parameters

value float

SetInvertX(bool)

Saves and applies sideways look inversion.

public static void SetInvertX(bool value)

Parameters

value bool

SetInvertY(bool)

Saves and applies vertical look inversion.

public static void SetInvertY(bool value)

Parameters

value bool

SetMaxZoom(float)

Saves and applies the third-person zoom limit.

public static void SetMaxZoom(float value)

Parameters

value float

SetShoulderHeight(float)

Saves and applies the over-the-shoulder view's height.

public static void SetShoulderHeight(float value)

Parameters

value float

SetShoulderLeft(bool)

Saves and applies which shoulder the view looks past.

public static void SetShoulderLeft(bool left)

Parameters

left bool

SetShoulderMaxZoom(float)

Saves and applies the over-the-shoulder zoom limit.

public static void SetShoulderMaxZoom(float value)

Parameters

value float

SetShoulderOffset(float)

Saves and applies the over-the-shoulder view's sideways distance.

public static void SetShoulderOffset(float value)

Parameters

value float

SetStyle(KCCCameraStyle)

Saves a style and applies it.

public static void SetStyle(KCCCameraStyle style)

Parameters

style KCCCameraStyle

SetZoomStep(float)

Saves and applies the zoom step.

public static void SetZoomStep(float value)

Parameters

value float

SwapShoulder()

The Swap Shoulder key: the view slides to the other shoulder. Saved, so the next session keeps it.

public static void SwapShoulder()

ToggleFirstPerson()

The first-person key: into first person, or back out to the style the player was using before. Saved, so the Options panel and the next session agree with what the key did.

public static void ToggleFirstPerson()

Events

OnShoulderChanged

Raised when the shoulder changes, so the Options panel shows what the Swap Shoulder key did.

public static event Action<bool> OnShoulderChanged

Event Type

Action<bool>

OnStyleChanged

Raised when the style changes, from the Options panel or from the first-person key, so whichever of the two did not make the change can show it.

public static event Action<KCCCameraStyle> OnStyleChanged

Event Type

Action<KCCCameraStyle>