ConstantForce 恒力

Inherits from Behaviour

A force applied constantly.


This is a small physics utility class used to apply a continous force to an object.


Rigidbody.AddForce applies a force to the Rigidbody only for one frame, thus you have to keep calling the function. ConstantForce on the other hand will apply the force every frame until you change the force or torque to a new value.

Rigidbody.AddForce只在一帧中应用一个力给Rigidbody,因此你必须持续地调用这个函数。 另一方面ConstantForce将在每一帧中应用这个力,直到你改变这个力或力矩到一个新的值。

参考: Rigidbody


Inherited members继承成员

Inherited Variables继承变量

Inherited Functions继承函数