Roblox UtilitiesDevlHub Roblox Documentation

Class

SwimController

Memory category
Instances

The ControllerBase that moves a ControllerManager character while it is swimming.

SwimController is the ControllerBase that a ControllerManager activates to move a physics-based character while it is swimming. When it is the manager's ControllerManager.ActiveController, it drives the ControllerManager.RootPart toward the manager's target velocity (scaled by ControllerBase.MoveSpeedFactor), pitches the character to face the ControllerManager.FacingDirection, and rolls it to keep it oriented in the water. Pitch rotation is tuned with SwimController.PitchMaxTorque and SwimController.PitchSpeedFactor, and roll with SwimController.RollMaxTorque and SwimController.RollSpeedFactor, with the speed factors scaled by ControllerManager.BaseTurnSpeed. A SwimController only functions when parented to a ControllerManager.

Properties 4#

PitchMaxTorquefloatThe maximum torque used to rotate to the desired pitch.ReadSafe
PitchSpeedFactorfloatMultiplied by ControllerManager.BaseTurnSpeed to determine the maximum angular velocity for pitch.ReadSafe
RollMaxTorquefloatThe maximum torque applied to rotate to the desired roll.ReadSafe
RollSpeedFactorfloatMultiplied by ControllerManager.BaseTurnSpeed to determine the maximum angular velocity for roll.ReadSafe

PitchMaxTorque: float#

ReadSafe

The maximum torque used to rotate on the local X axis to the desired pitch orientation. Has no effect if ControllerBase.RigidityEnabled is true.

PitchSpeedFactor: float#

ReadSafe

Multiplied by ControllerManager.BaseTurnSpeed to determine the maximum angular velocity rotating on the local X axis. Has no effect if ControllerBase.RigidityEnabled is true.

RollMaxTorque: float#

ReadSafe

The maximum torque applied to rotate on the local Z axis to the desired roll orientation. Has no effect if ControllerBase.RigidityEnabled is true.

RollSpeedFactor: float#

ReadSafe

Multiplied by ControllerManager.BaseTurnSpeed to determine the maximum angular velocity rotating on the local Z axis. Has no effect if ControllerBase.RigidityEnabled is true.

Inherited members#

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

ClassName, className

Events (1)

Changed