applyForce
applyForce<
Target>(authority,entity,force,forceOptions?):BodyRefusal|null
Pushes a dynamic body with force, in newtons, for the next physics
step alone, as Unity’s AddForce does: a system that stops calling it
stops pushing. With at, a point in world space, it also spins it.
Wakes a sleeping body. Returns null, or in a deployed world the reason
it refused.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
Target extends Entity |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
authority |
EntityAuthority |
entity |
BodyTarget<Target, Dynamic> |
force |
Vector3Like |
forceOptions |
ForceOptions |
Returns
Section titled “Returns”BodyRefusal | null
Example
Section titled “Example”applyForce(step, boat, thrust); // each step it should push