RPG Camera

Name Type Description
ActivateCameraControl bool If set to false, all camera controls are disabled. Can be used to turn off the camera when interacting with a GUI (e.g. see the demo GUI interaction).
AlignCameraSmoothTime float The time needed to align with the character if “AlignCameraWhenMoving” is set to true.
AlignCameraWhenMoving bool If set to true, the camera view direction aligns with the character’s view/walking direction once the character starts to move (forward/backwards/strafe).
AlignCharacter AlignCharacter Determines when the character’s view/walking direction should be set to the camera’s view direction.
AlignCharacterInput string Specifies the name of the input to set the character view direction to the camera’s if “AlignCharacter” is set to “OnAlignmentInput”.
AlignCharacterSpeed float Controls the character-to-camera turning speed if “AlignCharacter” is not set to “Never”.
AlwaysRotateCamera bool Let the camera always orbit around its pivot without pressing any input.
CameraPivotLocalPosition Vector3 This is the position of the camera pivot in local character coordinates. Turn on Gizmos to display it as a small cyan sphere.
ConstrainMouseX bool Constrain the camera’s orbit horizontal axis from “MouseXMin” degrees to “MouseXMax” degrees.
CursorLockMode CursorLockMode How the cursor should behave. See Unity’s documentation for more.
DistanceSmoothTime float The time needed to zoom in and out a step.
HideCursorWhenPressed bool Hides the cursor once “Fire1” or “Fire2” is pressed (or always if “AlwaysRotateCamera” is set to true).
InvertMouseX bool Inverts the horizontal orbit axis.
InvertMouseY bool Inverts the vertical orbit axis.
LockMouseX bool Locks the horizontal orbit axis.
LockMouseY bool Locks the vertical orbit axis.
MaxDistance float The maximum distance to zoom out to.
MinDistance float The minimum distance to zoom in to.
MouseScrollSensitivity float The sensitivity of the zooming input.
MouseSmoothTime float The time needed for the camera to orbit around its pivot. The higher the smoother the orbiting.
MouseXMax float The maximum degrees for orbiting on the horizontal axis. Needs “ConstrainMouseX” to be true.
MouseXMin float The minimum degrees for orbiting on the horizontal axis. Needs “ConstrainMouseX” to be true.
MouseXSensitivity float The sensitivity of orbiting the camera on the horizontal axis.
MouseYMax float The maximum degrees for orbiting on the vertical axis.
MouseYMin float The minimum degrees for orbiting on the vertical axis.
MouseYSensitivity float The sensitivity of orbiting the camera on the vertical axis.
RotateWithCharacter RotateWithCharacter Determines if the camera should also rotate when the character starts to rotate.
RotationStoppingInput string The name of the input which pauses rotation with the character. Needs “RotateWithCharacter” to be set to “RotationStoppingInput”.
StartDistance float The camera’s starting distance.
StartMouseX float The camera’s starting degrees on the horizontal axis.
StartMouseY float The camera’s starting degrees on the vertical axis.
SupportWalkingBackwards bool Let the camera face the front of the character when walking backwards. Needs “AlignCameraWhenMoving” to be true.
UnderwaterFogColor Color Color of the fog which is activated when the camera is under the water surface.
UnderwaterFogDensity float Density of the fog which is activated when the camera is under the water surface.
UnderwaterThreshTuning float For fine-tune the threshold where the camera is considered as underwater. The higher the value, the earlier the underwater effects kick in.
UsedCamera Camera Reference to the camera object used by the script. If no camera is assigned to this variable, a new one will be generated automatically when entering the play mode.
UsedSkybox Material This is the current skybox used by the camera referenced by “UsedCamera”. The skybox can be changed at runtime by calling the script’s method “SetUsedSkybox(material)”. Direct assignments to this variable won’t take effect.

RPG View Frustum

Name Type Description
AffectingTags List<string> A list of names of tags which force the camera to zoom in if the camera pivot is occluded. Needs “OcclusionHandling” to be set to “TagDependent”.
CharacterFadeEndDistance float The distance between the camera and its pivot where the character is faded out to “CharacterFadeOutAlpha”.
CharacterFadeOutAlpha float The alpha value of the character when the “CharacterFadeEndDistance” has been reached.
CharacterFadeStartDistance float The distance between the camera and its pivot where the character fading starts.
EnableCharacterFading bool If set to true, the character starts to fade when the camera’s distance to its pivot is smaller than the “Character Fade Start Distance”.
FadeInAlpha float The alpha to which objects fade back in after they left the view frustum.
FadeInDuration float The fade in duration of objects which have left the view frustum.
FadeOutAlpha float The alpha to which objects fade out when they enter the view frustum.
FadeOutDuration float The fade out duration of objects which have entered the view frustum.
OccludingLayers LayerMask Layers of objects which should be recognized by the camera and its view frustum. The influence of this layer mask heavily depends on the set “OcclusionHandling”.
OcclusionHandling OcclusionHandling Specifies how the camera reacts on objects inside its view frustum. See the manual for further information on the different enum values.

RPG Motor

Name Type Description
AirborneSpeed float The speed of the movement impulses while airborne (assuming “AllowedAirborneMoves” > 0).
AllowedAirborneMoves int The number of allowed movement impulses while airborne.
BackwardsSpeedMultiplier float The multiplier for computing the walking backwards speed. BackwardsSpeed = CurrentSpeed * BackwardsSpeedMultiplier.
DiveOnlyWhenSwimmingForward bool If set to true, the character starts to dive only when moving forward (or backwards). Otherwise, the character remains in an upright stance.
FallingThreshold float A value representing the degree at which the character starts to fall. The default value is “6” to let the character be grounded when walking down small hills.
Gravity float A value representing the downward force of gravity.
GroundObjectAffectsJump bool If set to true, the character’s jumping direction is affected by the ground object, i.e. performing a standing jump on a moving object lets the character always land on the same spot of the object.
JumpHeight float The height the character jumps in world units.
MoveWithMovingGround bool If set to true, the character passively moves with moving objects, e.g. moving platforms, when standing on them.
RotateWithRotatingGround bool If set to true, the character passively rotates with rotating objects, e.g. rotating platforms, when standing on them.
RotatingSpeed float The speed of character rotation
RunSpeed float The speed of character movement when walking is toggled off.
SlidingThreshold float The terrain/ground angle at which the character starts to slide down. E.g. a value of “40” means that the character starts to slide off every hill or surface which is steeper than 40 degrees.
SprintSpeedMultiplier float The multiplier for computing the sprinting speed while the sprint button is pressed. SprintSpeed = CurrentSpeed * SprintSpeedMultiplier.
StrafeSpeed float The speed of character movement while solely strafing. A combined speed is computed when also running/walking forward/backwards.
SwimmingStartHeight float Local water height at which the character should start to swim. Enable Gizmos for easier setup.
UnlimitedAirborneMoves bool If set to true, the number of allowed moves while airborne is unlimited.
WalkSpeed float The speed of character movement when walking is toggled on.