BodyVelocity

非推奨を表示
非推奨

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.

概要

プロパティ

  • 並列読み取り

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

  • 並列読み取り

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

  • 並列読み取り

    Determines the goal velocity.

方法

プロパティ

MaxForce

並列読み取り

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).

並列読み取り

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

並列読み取り

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.

方法

GetLastForce

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


戻り値

lastForce

Returns the last force in the object.


戻り値

イベント