Class
SwimController
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#
PitchMaxTorquefloat | The maximum torque used to rotate to the desired pitch.ReadSafe |
PitchSpeedFactorfloat | Multiplied by ControllerManager.BaseTurnSpeed to determine the
maximum angular velocity for pitch.ReadSafe |
RollMaxTorquefloat | The maximum torque applied to rotate to the desired roll.ReadSafe |
RollSpeedFactorfloat | Multiplied 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
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