PhysicsBodySnapshot

@Immutable
data class PhysicsBodySnapshot(val key: Any, val transformPx: PhysicsTransform, val isAwake: Boolean, val linearVelocityPxPerSecond: PhysicsVector2)

Immutable body state exported as part of PhysicsWorldSnapshot.

This DTO is intended for render-time usage: it contains only the data required to apply translation/rotation and optionally drive effects based on motion.

Constructors

Link copied to clipboard
constructor(key: Any, transformPx: PhysicsTransform, isAwake: Boolean, linearVelocityPxPerSecond: PhysicsVector2)

Properties

Link copied to clipboard

Whether the body is considered awake by the backend (not sleeping).

Link copied to clipboard
val key: Any

Stable identifier of the body (Modifier.physicsBody(key = ...)).

Link copied to clipboard

Linear velocity in pixel space (px/s).

Link copied to clipboard

Body transform in container pixel space (translation + rotation).