Realot StudioDocs
Components

CharacterController

Realot Studio CharacterController component reference: fields, script API, behavior and examples.

View as Markdownllms.txt
ScopeThis page documents the CharacterController component in Realot Studio. Runtime fields are serialized scene data; the Script API section lists only members intentionally exposed to game scripts.
Where to find it in the editorInspector → Add Component → Movement Type. Pick Character Controller, Platformer, Top-Down, Car, Follow or Patrol; fields in the Inspector change with the selected mode.

#What it does

High-level movement modes: Character Controller, Platformer, Top-Down, Car, Follow, Patrol and Free.

Component setup & editor toolsCharacterController provides the higher-level movement behaviors such as Platformer, Car, Follow, or Patrol when configured with the required physics components.

#How to add and use CharacterController

Editor path: Select the target entity in the Hierarchy (left side) → look at the Inspector (right side) → click Add Component at the bottom of the Inspector → search for CharacterController → click the component row. The Add Component picker is a centered modal with a search box; it only lists components not already attached.

For components with a dedicated editor tool, the tool is opened or activated from the location described below. Do not assume that adding the component alone activates its editor; some systems require a separate window, panel, or viewport tool.

#Component setup & editor tools

  • Select entity → Inspector → Add Component → Movement Type (CharacterController). Choose the controller type first; the Inspector then exposes the relevant movement fields. Platformer/Car/Follow/Patrol fields are not interchangeable—configure only the group belonging to the selected controller type.

#What you should see after adding it

The component appears as its own section in the Inspector. Its serialized settings are listed in the Component data table below. If a field is conditional, it appears only when the relevant mode/type is selected. If a field is a runtime state field (for example grounded or resolved velocity), treat it as read-only diagnostic state unless the API reference explicitly documents it as writable.

#How to read the settings

For every setting below, the documentation distinguishes type, default, meaning, and tuning direction where behavior is known. When a value represents a direction, use the engine's coordinate convention documented in Coordinate system; do not substitute Unity/Godot conventions.

#Component data

FieldTypePurposeDefault
controllerTypeControllerType enum: Character Controller | Platformer | Top-Down | Car | Follow | Patrol | FreeCharacter Controller | Platformer | Top-Down | Car | Follow | Patrol | Free.Character Controller
moveSpeednumberMovement (Character / Platformer / Top-Down) px/s200
accelerationnumberhow fast velocity approaches target (higher = snappier)20
airControlnumber0-1 multiplier on acceleration while airborne (Platformer only)0.5
canJumpbooleanJump (Character Controller + Platformer)true
jumpForcenumberpx/s upward velocity applied on jump420
maxJumpsnumber1 = no double jump, 2 = double jump, etc.1
useGravitybooleanGravity (Character Controller can toggle it off for e.g.true
gravityScalenumberMultiplier on gravity's strength for Character Controller/Platformer (same name/semantics as Rigidbody2D.gravityScale on a Dynamic body — 1 = normal, 2 = falls twice as fast, 0.5 = floaty/moon-gravity, 0 = no downward pull at all while still respecting useGravity's on/off switch).1
useDefaultInputbooleanInput. For Character/Platformer/Top-Down and Car, this controls the built-in keyboard while script APIs can contribute in the same frame.true
maxSpeednumberCar-specific (Car controller only) top forward speed in px/s350
carAccelerationnumberhow fast the car speeds up (px/s^2)200
brakeForcenumberhow fast it brakes / goes into reverse (px/s^2)400
turnSpeednumbermax turn rate in deg/s (at full speed; scales down at lower speeds)150
driftFactornumber0-1: how much lateral velocity is retained (higher = more slide)0.92
driveTowardArriveDistancenumberpx from the target that counts as "arrived" for12
targetNamestringFollow-specific (Follow controller only) name of the entity to pursue
followSpeednumberpursuit speed in px/s150
followDistancenumberstop when within this many pixels of the target5
patrolDistancenumberPatrol-specific (Patrol controller only).150
patrolModePatrolMode enum: Platformer | Top-DownPatrol's own movement scheme — see PatrolMode above.Platformer
patrolAxisPatrolAxis enum: Horizontal | VerticalWhich axis a TopDown-mode Patrol walks along — see PatrolAxis above.Horizontal
requestJumpbooleanSet (transiently, for one ControllerSystem update) by this.controller.simulateJump() (see scripting/components/ ControllerAPI.js) to trigger a jump from script logic — consumed and reset to false by ControllerSystem.js right after reading it, the same one-shot request pattern Rigidbody2D's pendingForceX/Y uses.false
requestMoveXnullable valueSet (transiently, for one ControllerSystem update) by this.controller.simulateMove(x, y) (see scripting/components/ ControllerAPI.js) as a script/joystick movement contribution.null
requestMoveYnullable valueInspector field stored on this component.null
requestThrottlenullable valueSet (transiently, for one ControllerSystem update) by this.controller.simulateDrive(throttle, steer) (see scripting/ components/ControllerAPI.js), Car-only.null
requestSteernullable valueInspector field stored on this component.null
requestJoystickXnullable valueSet (transiently, for one ControllerSystem update) by this.controller.simulateDriveJoystick(x, y) (see scripting/ components/ControllerAPI.js), Car-only.null
requestJoystickYnullable valueInspector field stored on this component.null
requestDriveTowardXnullable valueSet (transiently, for one ControllerSystem update) by this.controller.simulateDriveToward(x, y) (see scripting/ components/ControllerAPI.js), Car-only.null
requestDriveTowardYnullable valueInspector field stored on this component.null
requestFlipbooleanSet (transiently, for one ControllerSystem update) by this.controller.flipDirection() (see scripting/components/ ControllerAPI.js), Patrol-only.false

#Tuning behavior

These are the practical direction-of-change rules for the most important controls on this component.

SettingWhat changing it does
moveSpeedHigher = faster target movement.
accelerationHigher = reaches the requested speed faster; lower = softer/slower ramp.
airControlFor Platformer, 0 removes horizontal air steering; 1 gives full ground-like acceleration in air.
jumpForceHigher = stronger/faster upward launch; lower = shorter jump.
gravityScale1 = normal controller gravity, 0 = no controller gravity; higher magnifies the pull.

#Script API

MemberKindDescription
accelerationProperty (read/write)Acceleration.
airControlProperty (read/write)Air-control factor.
brakeForceProperty (read/write)Car brake force.
canJumpProperty (read/write)Whether jumping is available.
controllerTypeProperty (read-only)Read-only movement type.
driftFactorProperty (read/write)Car drift factor.
driveTowardArriveDistanceProperty (read/write)Exposed by this script module.
facingDirectionProperty (read-only)Current patrol facing direction.
flipDirection()MethodReverse Patrol direction.
followDistanceProperty (read/write)Follow distance.
followSpeedProperty (read/write)Follow speed.
gravityScaleProperty (read/write)Gravity scale.
groundAngleProperty (read-only)Ground angle.
isGroundedProperty (read-only)Ground state.
isOnCeilingProperty (read-only)Ceiling contact.
isOnSlopeProperty (read-only)Slope contact.
isOnWallProperty (read-only)Wall contact.
jumpForceProperty (read/write)Jump force.
maxJumpsProperty (read/write)Maximum jumps.
maxSpeedProperty (read/write)Car maximum speed.
moveSpeedProperty (read/write)Movement speed.
patrolAxisProperty (read/write)Horizontal | Vertical.
patrolDistanceProperty (read/write)Patrol distance.
patrolModeProperty (read/write)Platformer | Top-Down.
simulateDrive(throttle, steer)MethodDrive a Car controller by script.
simulateDriveJoystick(x, y)MethodDrive using joystick-style vector input.
simulateDriveToward(x, y)MethodDrive toward a world point.
simulateJump()MethodRequest a jump.
simulateMove(x, y)MethodDrive movement by script.
targetNameProperty (read/write)Follow target name.
turnSpeedProperty (read/write)Car turn speed.
useDefaultInputProperty (read/write)Built-in input mapping.
useGravityProperty (read/write)Gravity toggle.

#Notes & behavior

  • Car-only fields/actions are meaningful for the Car controller. Patrol has its own patrolMode and patrolAxis. Free is script-driven with no built-in input mapping.

#Examples

js
this.controller.simulateMove(input.keyDown("ArrowRight") ? 1 : 0, 0);
js
this.controller.simulateJump();
Need the full workflow?Components: complete workflow covers adding, configuring, testing, combining, and removing components.