Roblox UtilitiesDevlHub Roblox Documentation

Class

ControllerManager

Inherits
Instance › Object
Memory category
Instances

Manages simulated motion control for its assigned ControllerManager.RootPart .

The ControllerManager instance manages simulated motion control for its assigned ControllerManager.RootPart. It can be used to build a physics-based character controller.

Properties 9#

ActiveControllerControllerBaseThe ControllerBase that is set to be activated on the character.ReadSafe
BaseMoveSpeedfloatThe base linear movement speed used by all controllers.ReadSafe
BaseTurnSpeedfloatThe base angular turning speed used by all controllers.ReadSafe
ClimbSensorControllerSensorA reference to the sensor data used while a ClimbController is active.ReadSafe
FacingDirectionVector3The unit vector describing the desired direction to face.ReadSafe
GroundSensorControllerSensorA reference to the sensor data used while a GroundController is active.ReadSafe
MovingDirectionVector3The vector describing the desired direction to move in.ReadSafe
RootPartBasePartThe BasePart where the controller's forces and torques are applied.ReadSafe
UpDirectionVector3The unit vector describing the up direction for the character.ReadSafe

ActiveController: ControllerBase#

ReadSafe

The ControllerBase that is set to be activated on the character. It does not guarantee that the specified ControllerBase is, in fact, active. If the ControllerBase cannot be activated for whatever reason, such as being outside of the character's WorldRoot or no Part being found to use as the floor for a GroundController, it will remain set and the ControllerManager will attempt to activate it in the next frame. This property can be set to nil to disable the physics controller.

BaseMoveSpeed: float#

ReadSafe

The base linear movement speed used by all controllers. Controllers individually customize speed by setting the ControllerBase.MoveSpeedFactor property.

BaseTurnSpeed: float#

ReadSafe

The base angular turning speed used by all controllers to align the character to face the desired direction.

ClimbSensor: ControllerSensor#

ReadSafe

A reference to the sensor data used while a ClimbController is active. A ClimbController will use the ControllerPartSensor.HitPart, ControllerPartSensor.HitFrame, and ControllerPartSensor.HitNormal for climb movement computations. Typically a ControllerPartSensor set to SensorMode.Ladder is used here. Otherwise, you can override the sensor's outputs to direct what sensor data you want the ClimbController to use.

FacingDirection: Vector3#

ReadSafe

The unit vector describing the desired direction to face. Aligns the LookVector of the ControllerManager.RootPart to this. Any Vector3 assigned will be automatically unitized.

GroundSensor: ControllerSensor#

ReadSafe

A reference to the sensor data used while a GroundController is active. A GroundController will use the ControllerPartSensor.HitPart, ControllerPartSensor.HitFrame, and ControllerPartSensor.HitNormal for ground movement computations. Typically a ControllerPartSensor set to SensorMode.Floor is used here. Otherwise, you can override the sensor's outputs to direct what sensor data you want the GroundController to use.

MovingDirection: Vector3#

ReadSafe

The vector describing the desired direction to move in, with a magnitude between 0 and 1. This is multiplied by BaseMoveSpeed to determine a final target move velocity. The RootPart will attempt to move in this direction based on the rules defined by the ActiveController.

RootPart: BasePart#

ReadSafe

The BasePart where the controller's forces and torques are applied. With a typical Humanoid-based character, the Humanoid.RootPart is assigned as the ControllerManager.RootPart.

UpDirection: Vector3#

ReadSafe

The unit vector describing the up direction for the character, which defaults to (0, 1, 0) (world up). Controllers under this ControllerManager use it to keep the RootPart upright and to orient direction-dependent forces. For example, a GroundController applies levitation and balancing forces along this direction, while an AirController and SwimController align the character to it. Any Vector3 assigned is automatically unitized; a zero, NaN, or infinite value is ignored.

Inherited members#

Inherited from Instance 58
Inherited from Object 6
Properties (2)

ClassName, className

Events (1)

Changed