Class
BodyVelocity
Deprecated
Applies a force to maintain a constant velocity.
Deprecated. This object is deprecated and should not be used for new work. Use
LinearVelocity instead, and see the
legacy conversion notes.
The BodyVelocity object applies a force on an assembly such that it will
maintain a constant velocity. The Velocity
property, not to be confused with BasePart.AssemblyLinearVelocity,
controls the goal velocity.
BodyVelocity is the linear counterpart to BodyAngularVelocity.
If you need the assembly to move toward a goal position, use
BodyPosition instead. If you need further control on a force applied
to an object, consider using a BodyForce or BodyThrust
instead.
The strength of the force applied by this object is controlled by several
factors, namely the difference between the assembly's current velocity and the
goal velocity. This is multiplied by P (power) to
either amplify or diminish it. The resulting force is then capped by
MaxForce.
Properties 5#
MaxForceVector3 | Determines the limit on how much force that may be applied to each axis.ReadSafe |
maxForceVector3 | ReadSafeDeprecatedNotReplicated |
Pfloat | Determines how aggressive of a force is applied in reaching the goal velocity.ReadSafe |
VelocityVector3 | Determines the goal velocity.ReadSafe |
velocityVector3 | ReadSafeDeprecatedNotReplicated |
MaxForce: Vector3#
ReadSafe
maxForce: Vector3#
NotReplicatedDeprecatedReadSafeDeprecated
Deprecated. This property is a deprecated variant of BodyVelocity.MaxForce
which should be used instead.
P: float#
ReadSafe
This property determines how much power is used while applying force in
order to reach the goal Velocity. The higher
this value, the more power will be used and the faster it will be used.
The force the BodyVelocity exerts increases as the difference
between the assembly's current velocity and the goal velocity increases.
This property is multiplied to this force to either amplify or diminish
it.
Velocity: Vector3#
ReadSafe
This property (not to be confused with BasePart.Velocity)
determines the target velocity towards which force will be exerted. It is
specified relative to the world, not the assembly.
velocity: Vector3#
NotReplicatedDeprecatedReadSafeDeprecated
Deprecated. This property is a deprecated variant of BodyVelocity.Velocity
which should be used instead.
Methods 2#
| GetLastForce | Not implemented and will always return the 0 vector. |
| lastForce | Returns the last force in the object. |
GetLastForce(): Vector3#
This method is not implemented and it will always return the 0 vector.
You are advised to use AlignPosition instead.
Returns
lastForce(): Vector3#
Returns the last force in the object.
Returns
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