Skip to content

@modoki/engine / index / addForce3D

Function: addForce3D()

addForce3D(world, entity, x, y, z, wakeUp?): boolean

Add a CONTINUOUS linear force (world units). NOTE Rapier semantics: the force persists across steps until resetForces3D — for a per-frame force, re-add it each frame (and reset), or prefer applyImpulse3D for one-shots.

Parameters

world

World

entity

Entity

x

number

y

number

z

number

wakeUp?

boolean = true

Returns

boolean

Built with Modoki.