EnqueueImpulse

data class EnqueueImpulse(val key: Any, val impulseXPx: Float, val impulseYPx: Float, val wake: Boolean = true) : PhysicsCommand

Applies a linear impulse to a body.

Parameters

key

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

impulseXPx

X component of impulse in container pixels (Px). Converted internally to physics impulse units by dev.zinchenko.physicsbox.units.PhysicsUnits.

impulseYPx

Y component of impulse in container pixels (Px). Converted internally to physics impulse units by dev.zinchenko.physicsbox.units.PhysicsUnits.

wake

Whether the backend should wake the body if supported.

Constructors

Link copied to clipboard
constructor(key: Any, impulseXPx: Float, impulseYPx: Float, wake: Boolean = true)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val key: Any
Link copied to clipboard