PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

BodyVelocity

Show deprecated

BodyVelocity

Show deprecated

The BodyVelocity object applies a force on a BasePart such that it will maintain a constant velocity. The BodyVelocity/Velocity property, not to be confused wtih BasePart/Velocity, controls the goal velocity. This is the translational counterpart to a BodyAngularVelocity. If you need the part to move toward a goal position, use a 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 part’s current velocity and the goal velocity. This is multiplied by BodyVelocity/P|P (power) to either amplify or diminish it. The resulting force is then capped by BodyVelocity/MaxForce|MaxForce. By setting BodyVelocity/Velocity to (0, 0, 0) it is possible to simulate BasePart/Anchored|Anchored behavior with less strictness.

Properties

Vector3

MaxForce

Determines the limit on how much force that may be applied to each axis

float

P

Determines how aggressive of a force is applied in reaching the goal velocity

Vector3

Velocity

Determines the goal velocity

Functions

Vector3

GetLastForce ( )

Returns the last force in the object.

Vector3

lastForce ( )

Returns the last force in the object.

Events