BodyVelocity

Afficher les obsolètes
obsolète

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 with BasePart.AssemblyLinearVelocity, controls the goal velocity.

BodyVelocity is the linear counterpart to BodyAngularVelocity. If you need the part 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 part'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.

Résumé

Propriétés

  • lecture parallèle

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

  • lecture parallèle

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

  • lecture parallèle

    Determines the goal velocity.

Méthodes

Propriétés

MaxForce

lecture parallèle

The MaxForce property determines the limit on the amount of force that may be applied on each axis in reaching the goal Velocity. If a part isn't moving, consider increasing this value (also check that it is not Anchored or attached to any anchored parts).

lecture parallèle

his property is ignored if PGS is enabled via Workspace.PGSPhysicsSolverEnabled, which is enabled by default.

The P 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 part's current velocity and the goal velocity increases. This property is multiplied to this force to either amplify or diminish it.

Velocity

lecture parallèle

The Velocity 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 part.

Méthodes

GetLastForce

GetLastForce is not implemented. It will always return the 0 vector. Developers are advised to use AlignPosition instead


Retours

lastForce

Returns the last force in the object.


Retours

Évènements