enqueueImpulse

fun enqueueImpulse(key: Any, impulseX: Float, impulseY: Float, wake: Boolean = true)

Queues a linear impulse for the body associated with key.

Units are interpreted by the runtime (typically physics units).

Parameters

key

Body key used in Modifier.physicsBody(key = ...).

impulseX

Impulse X component.

impulseY

Impulse Y component.

wake

Whether to wake the body if the backend supports sleeping.