Class
BodyGyro
Deprecated
Applies a torque to maintain a constant orientation.
Deprecated. This object is deprecated and should not be used for new work. Use
AlignOrientation instead, and see the
legacy conversion notes.
The BodyGyro object applies a torque (rotational force) on an assembly such
that it maintains a constant angular displacement, or orientation. This allows
for the creation of assemblies that point in a certain direction, as if a real
gyroscope were acting upon it. Essentially, it's the rotational counterpart to
a BodyPosition.
If you would like to maintain a constant angular velocity, use a
BodyAngularVelocity instead.
The CFrame property controls the goal orientation.
Only the angular components of the CFrame are used; position will
make no difference. MaxTorque limits the amount of
angular force that may be applied, P controls the power
used in achieving the goal orientation, and D controls
dampening behavior.
Properties 6#
CFrameCFrame | Determines the target orientation (translational component ignored).ReadSafe |
cframeCFrame | ReadSafeDeprecatedNotReplicated |
Dfloat | Determines the amount of dampening to use in reaching the goal
CFrame.ReadSafe |
MaxTorqueVector3 | Determines the limit on how much torque that may be applied to each axis.ReadSafe |
maxTorqueVector3 | ReadSafeDeprecatedNotReplicated |
Pfloat | Determines how aggressive of a torque is applied in reaching the goal orientation.ReadSafe |
CFrame: CFrame#
ReadSafe
This property (not to be confused with BasePart.CFrame) determines
the target orientation towards which torque will be exerted. Since
BodyGyro does not apply translational force, the
translational/positional component of the CFrame is ignored.
Consider using one of the following CFrame constructors in setting this
property: CFrame.fromAxisAngle(),
CFrame.fromEulerAnglesXYZ(), or
CFrame.fromEulerAnglesYXZ().
cframe: CFrame#
NotReplicatedDeprecatedReadSafeDeprecated
Deprecated. This property is a deprecated variant of BodyGyro.CFrame which
should be used instead.
D: float#
ReadSafe
This property defines how much dampening will be applied to the torque
used to reach the goal CFrame. When the assembly
approaches the goal orientation, it needs to decelerate, otherwise it will
rotate past the goal and have to stop and re-accelerate back toward the
goal. This often creates an undesirable "rubber‑banding" effect, avoided
by applying dampening. The higher this value is set, the greater the
dampening curve becomes, or the slower the assembly will approach the goal
orientation.
MaxTorque: Vector3#
ReadSafe
maxTorque: Vector3#
NotReplicatedDeprecatedReadSafeDeprecated
Deprecated. This property is a deprecated variant of BodyGyro.MaxTorque which
should be used instead.
P: float#
ReadSafe
This property determines how much power is used while applying torque in
order to reach the goal CFrame. The higher this
value, the more power will be used and the faster it will be used.
Inherited members#
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