CharacterController
CharacterControllers are responsible for the state handling and physics of
the Luanoid such as movement. Luanoids can accept different
CharacterControllers by setting the CharacterController propery on them.
See Custom CharacterControllers for writing your own CharacterController.
Properties
Luanoid
This item is read only and cannot be modified. Read OnlyCharacterController.Luanoid: LuanoidReference to the Luanoid this CharacterController is attached to.
RaycastParams
CharacterController.RaycastParams: RaycastParamsRaycastParams used to cast to the ground underneath the Luanoid's character.
CanRedirectJump
CharacterController.CanRedirectJump: boolean
Whether or not the Luanoid can "walk" when jumping. Default is
true to behave more like Humanoids.
Running
This item is read only and cannot be modified. Read OnlyCharacterController.Running: booleanWhether the CharacterController is currently running.
FiniteStateMachine
CharacterController.FiniteStateMachine: (characterController: CharacterController) → CharacterStateCallback that returns a CharacterState the Luanoid should currently be in.
States
This item is read only and cannot be modified. Read OnlyTable of signals fired when a state is entered, leaving, or stepped.
LastState
This item is read only and cannot be modified. Read OnlyCharacterController.LastState: CharacterStateThe previous CharacterState applied to the Launoid.
StateEnterTick
This item is read only and cannot be modified. Read OnlyCharacterController.StateEnterTick: numberThe time the Luanoid entered its current CharacterState using tick().
StateEnterPosition
This item is read only and cannot be modified. Read OnlyCharacterController.StateEnterPosition: Vector3The position the Luanoid entered its current CharacterState.
RaycastResult
This item is read only and cannot be modified. Read OnlyCharacterController.RaycastResult: RaycastResultThe CharacterController casts a ray to the ground from the corners and center of the RootPart. This is the result of the ray hitting closest to the RootPart.
RaycastResults
This item is read only and cannot be modified. Read OnlyCharacterController.RaycastResults: {RaycastResult}All rays casted by the CharacterController on this step of the simulation.
Stores
CharacterController.Stores: {[string]:Â any}Container for data to be stored and shared between the state handlers and FiniteStateMachine.
Functions
new
Creates a new CharacterController.
CastCollideOnly
Casts a ray while ignoring all Instances with CanCollide set to false.
Intended for use primarily within the CharacterController.
GetStateElapsedTime
CharacterController:GetStateElapsedTime() → numberReturns the elapsed time since the Luanoid entering its current state.
Start
CharacterController:Start() → ()Starts the CharacterController's simulation.
Stop
CharacterController:Stop() → ()Stops the CharacterController's simulation.