Class · inherits ControllerBase
GroundController
The ControllerBase that moves a ControllerManager character
while it is walking or standing on the ground.
About GroundController
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
AccelerationTime
: floatEstimated time taken to reach the desired speed.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
: floatThe maximum torque used to keep theControllerManager.RootPartaligned upright.The maximum torque used to keep the
ControllerManager.RootPartaligned upright. When misaligned, this amount of torque is applied to reach theBalanceSpeedand 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 whenControllerBase.BalanceRigidityEnabledis true.BalanceSpeed
: floatThe maximum angular speed used to align theControllerManager.RootPartupright.The maximum angular speed used to align the
ControllerManager.RootPartupright. 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
: floatEstimated time taken to reach a complete stop from full speed.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
: floatThe coefficient of friction of the character on the ground.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
: floatAmount the character's friction is weighed against the ground friction.Amount the character's friction is weighed against the ground friction, equal in behavior to the
FrictionWeightdata type ofBasePart.CustomPhysicalProperties. Higher values mean more of a part'sFrictionwill be used.GroundOffset
: floatThe target distance above the ground to keep theControllerManager.RootPartat.The target distance above the
Class.ControllerManager.GroundSensor.HitPositionto keep theControllerManager.RootPartat. 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
: floatThe value multiplied by theControllerManager.BaseTurnSpeed.The value multiplied by the
ControllerManager.BaseTurnSpeedto determine the final target angular velocity while this controller is active. The angular velocity is applied when turning towards theClass.ControllerManager.FacingDirection.
GroundController also has every member of ControllerBase. Deprecated and Roblox-only members are hidden.
Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.