Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

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 Parameter
Target extends Entity
Parameter Type
authority EntityAuthority
entity BodyTarget<Target, Dynamic>
force Vector3Like
forceOptions ForceOptions

BodyRefusal | null

applyForce(step, boat, thrust); // each step it should push