Skip to content

Camera Effects

Overview

Camera effect files control how the camera responds to gameplay events. The system has three layers: CameraEffect files trigger a named camera shake with an intensity value, CameraShake files define the actual oscillation curves for first-person and third-person views, and ViewBobbing files produce rhythmic camera motion during movement states. Together they add visceral feedback to combat strikes, footsteps, and traversal.

File Location

Assets/Server/Camera/
CameraEffect/
Battleaxe/
Battleaxe_Bash.json
Battleaxe_Sweep.json
Battleaxe_Swing_Horizontal.json
...
Block/
Crossbow/
Daggers/
Greatsword/
Longsword/
Spear/
Warhammer/
CameraShake/
Battleaxe/
Battleaxe_Bash.json
Battleaxe_Sweep.json
...
Daggers/
Greatsword/
Longsword/
Spear/
Warhammer/
ViewBobbing/
Climbing.json
Crouching.json
Flying.json
Idle.json
Mounting.json
None.json
Running.json
Sliding.json
Sprinting.json
SprintMounting.json
Swimming.json
Walking.json

Schema

CameraEffect

FieldTypeRequiredDefaultDescription
TypestringYesEffect type. Currently "CameraShake" is the only supported type.
CameraShakestringYesID of the camera shake definition to play. Resolves to a file in CameraShake/.
IntensityIntensityConfigYesControls the strength of the effect.

IntensityConfig

FieldTypeRequiredDefaultDescription
ValuenumberYesIntensity multiplier applied to the shake. Typical values range from 0.01 to 0.1.

CameraShake

Camera shake files define oscillation behaviour separately for first-person and third-person perspectives.

FieldTypeRequiredDefaultDescription
FirstPersonShakeViewNoShake configuration for first-person camera.
ThirdPersonShakeViewNoShake configuration for third-person camera.

ShakeView

FieldTypeRequiredDefaultDescription
DurationnumberNo0Total duration in seconds. 0 means the shake plays once through its oscillation cycles.
EaseInEaseNoFade-in transition at the start of the shake.
EaseOutEaseNoFade-out transition at the end of the shake.
OffsetAxisOscillationsNoPositional offset oscillations on X, Y, Z axes.
RotationRotationOscillationsNoRotational oscillations on Pitch, Yaw, Roll axes.

Ease

FieldTypeRequiredDefaultDescription
TimenumberYesDuration of the ease transition in seconds.
TypestringYesEasing function: "Linear", "QuadInOut", "QuadIn", "QuadOut".

Oscillation

Each axis in Offset (X, Y, Z) or Rotation (Pitch, Yaw, Roll) contains an array of oscillation entries:

FieldTypeRequiredDefaultDescription
FrequencynumberYesOscillation frequency in Hz. Higher values produce faster shaking.
AmplitudenumberYesMaximum displacement or rotation in units/degrees.
TypestringYesWave function: "Sin", "Cos", "Perlin_Hermite".
ClampClampConfigNoClamps the oscillation output to a range.

ClampConfig

FieldTypeRequiredDefaultDescription
MinnumberNoMinimum clamp value.
MaxnumberNoMaximum clamp value.

ViewBobbing

View bobbing files define rhythmic camera motion tied to movement states.

FieldTypeRequiredDefaultDescription
FirstPersonBobViewNoFirst-person view bobbing configuration.

BobView

FieldTypeRequiredDefaultDescription
EaseInEaseNoTransition into this bobbing state.
OffsetAxisOscillationsNoPositional oscillations (head bob).
RotationRotationOscillationsNoRotational oscillations (head tilt).

Examples

Camera effect (Assets/Server/Camera/CameraEffect/Battleaxe/Battleaxe_Sweep.json):

{
"Type": "CameraShake",
"CameraShake": "Battleaxe_Sweep",
"Intensity": {
"Value": 0.05
}
}

Camera shake (Assets/Server/Camera/CameraShake/Battleaxe/Battleaxe_Sweep.json, condensed):

{
"FirstPerson": {
"Duration": 0.0,
"EaseIn": { "Time": 0.25, "Type": "QuadInOut" },
"EaseOut": { "Time": 0.5, "Type": "QuadInOut" },
"Offset": { "X": [], "Y": [], "Z": [] },
"Rotation": {
"Pitch": [],
"Yaw": [
{ "Frequency": 30.0, "Amplitude": 0.4, "Type": "Sin" }
],
"Roll": []
}
},
"ThirdPerson": {
"Duration": 0.0,
"EaseIn": { "Time": 0.25, "Type": "QuadInOut" },
"EaseOut": { "Time": 0.5, "Type": "QuadInOut" },
"Rotation": {
"Yaw": [
{ "Frequency": 30.0, "Amplitude": 0.2, "Type": "Sin" }
]
}
}
}

View bobbing (Assets/Server/Camera/ViewBobbing/Running.json):

{
"FirstPerson": {
"EaseIn": { "Time": 0.5, "Type": "Linear" },
"Offset": {
"X": [
{ "Type": "Sin", "Frequency": 11.0, "Amplitude": 0.02 }
],
"Y": [
{ "Type": "Cos", "Frequency": 22.0, "Amplitude": 0.024, "Clamp": { "Min": -0.5 } },
{ "Type": "Perlin_Hermite", "Frequency": 22.0, "Amplitude": 0.005, "Clamp": { "Min": -0.5 } }
],
"Z": []
},
"Rotation": {
"Pitch": [
{ "Type": "Cos", "Frequency": 22.0, "Amplitude": 0.001 }
],
"Roll": []
}
}
}
  • Gameplay ConfigsCameraEffects field references camera effect configurations
  • Server Models — entity camera tracking configuration
  • Particles — visual particle effects triggered alongside camera shakes