Skip to content

Adjust Camera

Adjust Camera

Modifies the camera's position, rotation, scale, distance, and field of view over a specified duration.

Properties

System

Name Explanation Type
Camera Distance The distance of the camera from the target. Variable or Value
Clamp Pitch Whether to clamp the pitch of the camera to the configured minimum and maximum values. Toggle
Clamp Roll Whether to clamp the roll of the camera to the configured minimum and maximum values. Toggle
Clamp Yaw Whether to clamp the yaw of the camera to the configured minimum and maximum values. Toggle
Distance Enabled Whether the camera distance adjustment is enabled. Toggle
Duration The duration to adjust the camera in milliseconds. Variable or Value
Field of View The field of view of the camera in degrees. Variable or Value
Field of View Enabled Whether the field of view adjustment is enabled. Toggle
Pitch Enabled Whether the pitch rotation adjustment is enabled. Toggle
Roll Enabled Whether the roll rotation adjustment is enabled. Toggle
Run Asynchronously Whether the adjustment runs asynchronously, allowing subsequent commands to execute without waiting. Toggle
Scale The scale factor of the camera. Variable or Value
Scale Enabled Whether the scale adjustment is enabled. Toggle
Use As Delta Values When enabled, adjusts the camera by the specified amount relative to its current value rather than setting it to an absolute value. Toggle
X The X offset of the camera. Variable or Value
X (Pitch) The pitch rotation of the camera in degrees. Variable or Value
X Enabled Whether the X offset adjustment is enabled. Toggle
Y The Y offset of the camera. Variable or Value
Y (Yaw) The yaw rotation of the camera in degrees. Variable or Value
Y Enabled Whether the Y offset adjustment is enabled. Toggle
Yaw Enabled Whether the yaw rotation adjustment is enabled. Toggle
Z The Z offset of the camera. Variable or Value
Z (Roll) The roll rotation of the camera in degrees. Variable or Value
Z Enabled Whether the Z offset adjustment is enabled. Toggle

Examples

Move Camera X Position Over 500 Milliseconds

This adjusts the camera's X offset to 10 over a duration of 500 milliseconds.

adjust_camera(500, x: 10);
{"Data":{"AdjustmentDuration":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"500","VariableIndex":0,"Metadata":null},"ClampPitch":false,"ClampRoll":false,"ClampYaw":false,"Distance":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"","VariableIndex":0,"Metadata":null},"FieldOfView":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"","VariableIndex":0,"Metadata":null},"IsAsynchronousOperation":false,"IsDeltaOperation":false,"IsDistanceEnabled":false,"IsFieldOfViewEnabled":false,"IsRollEnabled":false,"IsPitchEnabled":false,"IsScaleEnabled":false,"IsXEnabled":true,"IsYEnabled":false,"IsYawEnabled":false,"IsZEnabled":false,"Roll":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"","VariableIndex":0,"Metadata":null},"Pitch":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"","VariableIndex":0,"Metadata":null},"Scale":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"","VariableIndex":0,"Metadata":null},"X":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"10","VariableIndex":0,"Metadata":null},"Y":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"","VariableIndex":0,"Metadata":null},"Yaw":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"","VariableIndex":0,"Metadata":null},"Z":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"","VariableIndex":0,"Metadata":null},"Metadata":null},"TypeName":"MAR.Game.RPGCore.Models.Scripts.Commands.Map.MapCameraAdjustmentCommand"}

Rotate Camera Pitch by 45 Degrees as Delta, Clamped

This adjusts the camera's pitch by 45 degrees relative to its current rotation over 1000 milliseconds, clamping it to configured limits.

adjust_camera(1000, pitch: 45, clamp_pitch, delta);
{"Data":{"AdjustmentDuration":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"1000","VariableIndex":0,"Metadata":null},"ClampPitch":true,"ClampRoll":false,"ClampYaw":false,"Distance":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"","VariableIndex":0,"Metadata":null},"FieldOfView":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"","VariableIndex":0,"Metadata":null},"IsAsynchronousOperation":false,"IsDeltaOperation":true,"IsDistanceEnabled":false,"IsFieldOfViewEnabled":false,"IsRollEnabled":false,"IsPitchEnabled":true,"IsScaleEnabled":false,"IsXEnabled":false,"IsYEnabled":false,"IsYawEnabled":false,"IsZEnabled":false,"Roll":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"","VariableIndex":0,"Metadata":null},"Pitch":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"45","VariableIndex":0,"Metadata":null},"Scale":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"","VariableIndex":0,"Metadata":null},"X":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"","VariableIndex":0,"Metadata":null},"Y":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"","VariableIndex":0,"Metadata":null},"Yaw":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"","VariableIndex":0,"Metadata":null},"Z":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"","VariableIndex":0,"Metadata":null},"Metadata":null},"TypeName":"MAR.Game.RPGCore.Models.Scripts.Commands.Map.MapCameraAdjustmentCommand"}

Set Camera Scale Asynchronously

This sets the camera scale to 2 instantly (0 duration), running asynchronously so the script continues immediately.

adjust_camera(0, scale: 2, async);
{"Data":{"AdjustmentDuration":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null},"ClampPitch":false,"ClampRoll":false,"ClampYaw":false,"Distance":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"","VariableIndex":0,"Metadata":null},"FieldOfView":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"","VariableIndex":0,"Metadata":null},"IsAsynchronousOperation":true,"IsDeltaOperation":false,"IsDistanceEnabled":false,"IsFieldOfViewEnabled":false,"IsRollEnabled":false,"IsPitchEnabled":false,"IsScaleEnabled":true,"IsXEnabled":false,"IsYEnabled":false,"IsYawEnabled":false,"IsZEnabled":false,"Roll":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"","VariableIndex":0,"Metadata":null},"Pitch":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"","VariableIndex":0,"Metadata":null},"Scale":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"2","VariableIndex":0,"Metadata":null},"X":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"","VariableIndex":0,"Metadata":null},"Y":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"","VariableIndex":0,"Metadata":null},"Yaw":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"","VariableIndex":0,"Metadata":null},"Z":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"","VariableIndex":0,"Metadata":null},"Metadata":null},"TypeName":"MAR.Game.RPGCore.Models.Scripts.Commands.Map.MapCameraAdjustmentCommand"}