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

applyImpulse

applyImpulse<Target>(authority, entity, impulse, forceOptions?): BodyRefusal | null

Changes a dynamic body’s velocity at once by impulse, in newton-seconds: a kick. With at, a point in world space, the push off its centre 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>
impulse Vector3Like
forceOptions ForceOptions

BodyRefusal | null

applyImpulse(step, ball, new Vector3(0, 2, 6), { at: contact });