What it does
physics.applyImpulse applies Impulse on a physics object. It takes an options object.
Signature
physics.applyImpulse({x, y, z})Arguments
{x, y, z}Keys:
xyz
Example · generated
function update(dt) { physics.applyImpulse({ x: 0, y: 2, z: 0 });}physics.applyImpulse is called with values of the shape its signature asks for. The code sits in update(dt), which the engine calls every frame: dt is the time since the last one, in seconds.