Physics
A domino chain through the complete collision pipeline
The sample joins mesh colliders, physics materials, dynamic rigid bodies, initial velocity, and collision events into one observable loop.
- Capability
- Rigid bodies, colliders, and event subscriptions
- Environment
- PICO Emulator 0.10
- Result
- Scene and start control rendered
Emulator capture
Captured from the local PICO Emulator 0.10 run; no mockup is used as test evidence.

What the run proved
Fourteen dominoes load on the table; the first receives velocity only after Start. Separating initialization from triggering makes scene and physics debugging much clearer.
Core code: static table, dynamic dominoes
Table and dominoes use convex shapes, but only dominoes get dynamic rigid bodies. Mass, center of mass, friction, and restitution shape the chain; velocity starts it.
RigidBodyComponent().apply {
massProperties = MassProperties(
mass = 0.04f,
centerOfMass = Vector3(0f, 0f, 0.02f)
)
rigidBodyMode = RigidBodyMode.DYNAMIC
isAffectedByGravity = true
}Tune physics parameters as a set; mass alone rarely explains behavior.
Core code: collisions drive visual feedback
EventManager retains a cancellable subscription. On collision enter, a custom DominoComponent index selects the PBR feedback color.
subscription = content.subscribe(CollisionEvents.Enter::class.java) {
collisionEnterCallback?.invoke(it)
}
val index = entityA.components[DominoComponent::class.java]?.index
changeMaterial(entityA, dominoColors[index - 1])Subscriptions must end with the container lifecycle to avoid duplicate callbacks.
