Skip to main content

applyTransformChanges

@zylem/game-lib


@zylem/game-lib / actions / applyTransformChanges

Function: applyTransformChanges()

applyTransformChanges(entity, store): void

Defined in: packages/game-lib/src/lib/actions/capabilities/apply-transform.ts:241

Apply accumulated transformations from the store to the physics body.

This is called automatically after onUpdate() callbacks complete, flushing all pending transformations to the physics engine in a single batch.

Flow:

  1. Check dirty flags to see what changed
  2. Apply changes to RigidBody
  3. Reset store for next frame

Parameters​

entity​

TransformableEntity

Entity with physics body and transform store

store​

TransformState

Transform store containing pending changes

Returns​

void