Class ClientCameraSettings
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
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
DefaultLookSensitivity
Sensitivity when nothing has been chosen.
public const float DefaultLookSensitivity = 2
Field Value
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
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
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
DefaultShoulderOffset
Sideways distance of the over-the-shoulder view when nothing has been chosen.
public const float DefaultShoulderOffset = 0.55
Field Value
DefaultStyle
The camera style when nothing has been chosen: the original centred camera.
public const KCCCameraStyle DefaultStyle = ThirdPerson
Field Value
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
MaximumFieldOfView
Widest field of view offered, degrees (vertical; about 121 across at 16:9).
public const float MaximumFieldOfView = 90
Field Value
MaximumLookSensitivity
Fastest the view may turn: wide enough for any value a player brings from another game.
public const float MaximumLookSensitivity = 20
Field Value
MaximumMaxZoom
Highest the third-person zoom limit may be set: double the authored one.
public const float MaximumMaxZoom = 20
Field Value
MaximumShoulderHeight
Highest the over-the-shoulder view may sit.
public const float MaximumShoulderHeight = 0.6
Field Value
MaximumShoulderMaxZoom
Highest the over-the-shoulder zoom limit may be set: double the authored one.
public const float MaximumShoulderMaxZoom = 8
Field Value
MaximumShoulderOffset
Most sideways distance offered. The pivot is also held to MaxShoulderReach.
public const float MaximumShoulderOffset = 0.9
Field Value
MaximumZoomStep
Largest zoom step offered.
public const float MaximumZoomStep = 2
Field Value
MinimumFieldOfView
Narrowest field of view offered, degrees (vertical).
public const float MinimumFieldOfView = 50
Field Value
MinimumLookSensitivity
Slowest the view may turn. Above zero: zero is a camera that cannot be moved.
public const float MinimumLookSensitivity = 0.05
Field Value
MinimumMaxZoom
Lowest the third-person zoom limit may be set.
public const float MinimumMaxZoom = 2
Field Value
MinimumShoulderHeight
Lowest the over-the-shoulder view may sit, below the follow point.
public const float MinimumShoulderHeight = -0.3
Field Value
MinimumShoulderMaxZoom
Lowest the over-the-shoulder zoom limit may be set.
public const float MinimumShoulderMaxZoom = 2
Field Value
MinimumShoulderOffset
Least sideways distance offered: any less is third person with a nearer camera.
public const float MinimumShoulderOffset = 0.2
Field Value
MinimumZoomStep
Smallest zoom step offered.
public const float MinimumZoomStep = 0.1
Field Value
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
Properties
FieldOfView
Vertical field of view, degrees.
public static float FieldOfView { get; }
Property Value
InvertX
Sideways look input reversed.
public static bool InvertX { get; }
Property Value
InvertY
Vertical look input reversed.
public static bool InvertY { get; }
Property Value
LookSensitivity
The sensitivity in effect, clamped. Read every frame by the look input.
public static float LookSensitivity { get; }
Property Value
MaxZoom
Farthest the wheel takes the third-person view, metres.
public static float MaxZoom { get; }
Property Value
MouseDegreesPerCount
Degrees the view turns for one count of mouse movement: sensitivity × 0.022.
public static float MouseDegreesPerCount { get; }
Property Value
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
ShoulderLeft
The over-the-shoulder view looks past the left shoulder.
public static bool ShoulderLeft { get; }
Property Value
ShoulderMaxZoom
Farthest the wheel takes the over-the-shoulder view, metres.
public static float ShoulderMaxZoom { get; }
Property Value
ShoulderOffset
How far to the side of the character the over-the-shoulder view sits, metres.
public static float ShoulderOffset { get; }
Property Value
StickDegreesPerSecondAtFullDeflection
Degrees a second the view turns at full deflection of a stick.
public static float StickDegreesPerSecondAtFullDeflection { get; }
Property Value
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
ZoomStep
Metres one notch of the wheel moves the view.
public static float ZoomStep { get; }
Property Value
Methods
ApplyAntialiasing(AntialiasingOption)
Writes an antialiasing mode onto the camera.
public static bool ApplyAntialiasing(ClientCameraSettings.AntialiasingOption option)
Parameters
optionClientCameraSettings.AntialiasingOptionThe mode to apply. An unrecognised value falls back to the default.
Returns
- bool
trueif a camera received it;falseif there is none yet.
ApplyLookSensitivity(float)
Sets the look sensitivity, and puts the camera into degrees.
public static bool ApplyLookSensitivity(float value)
Parameters
valuefloatThe sensitivity. Clamped to the supported range.
Returns
- bool
trueif a camera was found and set to take degrees;falseif 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
styleKCCCameraStyle
Returns
- bool
trueif 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
trueif 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
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
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
valuefloat
SetInvertX(bool)
Saves and applies sideways look inversion.
public static void SetInvertX(bool value)
Parameters
valuebool
SetInvertY(bool)
Saves and applies vertical look inversion.
public static void SetInvertY(bool value)
Parameters
valuebool
SetMaxZoom(float)
Saves and applies the third-person zoom limit.
public static void SetMaxZoom(float value)
Parameters
valuefloat
SetShoulderHeight(float)
Saves and applies the over-the-shoulder view's height.
public static void SetShoulderHeight(float value)
Parameters
valuefloat
SetShoulderLeft(bool)
Saves and applies which shoulder the view looks past.
public static void SetShoulderLeft(bool left)
Parameters
leftbool
SetShoulderMaxZoom(float)
Saves and applies the over-the-shoulder zoom limit.
public static void SetShoulderMaxZoom(float value)
Parameters
valuefloat
SetShoulderOffset(float)
Saves and applies the over-the-shoulder view's sideways distance.
public static void SetShoulderOffset(float value)
Parameters
valuefloat
SetStyle(KCCCameraStyle)
Saves a style and applies it.
public static void SetStyle(KCCCameraStyle style)
Parameters
styleKCCCameraStyle
SetZoomStep(float)
Saves and applies the zoom step.
public static void SetZoomStep(float value)
Parameters
valuefloat
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
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