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 Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
Target extends Entity |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
authority |
EntityAuthority |
entity |
BodyTarget<Target, Dynamic> |
impulse |
Vector3Like |
forceOptions |
ForceOptions |
Returns
Section titled “Returns”BodyRefusal | null
Example
Section titled “Example”applyImpulse(step, ball, new Vector3(0, 2, 6), { at: contact });