Class
GroundController
The ControllerBase that moves a ControllerManager character
while it is walking or standing on the ground.
GroundController is the ControllerBase that a
ControllerManager activates when its character is moving along or
standing on the ground. It keeps the ControllerManager.RootPart
hovering at GroundController.GroundOffset above the detected floor,
drives locomotion toward the manager's target velocity (ramped by
GroundController.AccelerationTime and
GroundController.DecelerationTime), keeps the root part upright, and
turns it toward the ControllerManager.FacingDirection. Ground friction
comes from the floor material and this controller's
GroundController.Friction and GroundController.FrictionWeight.
Parent one to a ControllerManager to supply on-ground movement; the
manager selects it through ControllerManager.ActiveController and
activates one controller at a time.
Properties 8#
AccelerationTimefloat | Estimated time taken to reach the desired speed.ReadSafe |
BalanceMaxTorquefloat | The maximum torque used to keep the ControllerManager.RootPart
aligned upright.ReadSafe |
BalanceSpeedfloat | The maximum angular speed used to align the
ControllerManager.RootPart upright.ReadSafe |
DecelerationTimefloat | Estimated time taken to reach a complete stop from full speed.ReadSafe |
Frictionfloat | The coefficient of friction of the character on the ground.ReadSafe |
FrictionWeightfloat | Amount the character's friction is weighed against the ground friction.ReadSafe |
GroundOffsetfloat | The target distance above the ground to keep the
ControllerManager.RootPart at.ReadSafe |
TurnSpeedFactorfloat | The value multiplied by the ControllerManager.BaseTurnSpeed.ReadSafe |
AccelerationTime: float#
ReadSafe
Estimated time (in seconds) taken to reach the desired speed after walking input begins. The character will accelerate linearly at the computed rate, impacted by friction, so a given time may be less accurate with lower friction.
BalanceMaxTorque: float#
ReadSafe
The maximum torque used to keep the ControllerManager.RootPart
aligned upright. When misaligned, this amount of torque is applied to
reach the BalanceSpeed and realign
the root part. A higher torque means more force is required to cause the
root part to tilt. A lower torque means it's easer for the root part to
get knocked over when running into things. This property is hidden and has
no effect when ControllerBase.BalanceRigidityEnabled is true.
BalanceSpeed: float#
ReadSafe
The maximum angular speed used to align the
ControllerManager.RootPart upright. A lower value means it takes
longer for the root part to recover to the upright position when
misaligned. A higher value results in a quicker recovery.
DecelerationTime: float#
ReadSafe
Estimated time (in seconds) taken to reach a complete stop from full speed after walking input ends. The character will decelerate linearly at the computed rate, impacted by friction, so a given time may be less accurate with lower friction.
Friction: float#
ReadSafe
The coefficient of friction for the character at the point between it and the ground. Determines how much force is available for locomotion or to keep the character stationary on slopes.
FrictionWeight: float#
ReadSafe
Amount the character's friction is weighed against the ground friction,
equal in behavior to the
FrictionWeight data type of
BasePart.CustomPhysicalProperties. Higher values mean more of a
part's Friction will be used.
GroundOffset: float#
ReadSafe
The target distance above the
ControllerManager.GroundSensor.HitPosition to keep the
ControllerManager.RootPart at. If the root part is below this
offset from the ground, a force is applied to raise up to this height. If
it's above, nothing happens.
TurnSpeedFactor: float#
ReadSafe
The value multiplied by the ControllerManager.BaseTurnSpeed to
determine the final target angular velocity while this controller is
active. The angular velocity is applied when turning towards the
Class.ControllerManager.FacingDirection.
Inherited members#
Inherited from ControllerBase 3
Properties (3)
Inherited from Instance 58
Properties (10)
Archivable, archivable, Capabilities, IsInSandbox, Name, Parent, PredictionMode, RobloxLocked, Sandboxed, UniqueId
Methods (39)
AddTag, children, ClearAllChildren, Clone, clone, Destroy, destroy, FindFirstAncestor, FindFirstAncestorOfClass, FindFirstAncestorWhichIsA, FindFirstChild, findFirstChild, FindFirstChildOfClass, FindFirstChildWhichIsA, FindFirstDescendant, GetActor, GetAttribute, GetAttributeChangedSignal, GetAttributes, GetChildren, getChildren, GetDebugId, GetDescendants, GetFullName, GetStyled, GetStyledPropertyChangedSignal, GetTags, HasTag, IsAncestorOf, IsDescendantOf, isDescendantOf, IsPropertyModified, QueryDescendants, Remove, remove, RemoveTag, ResetPropertyToDefault, SetAttribute, WaitForChild