physics

Adds Havok-based 3D rigid body physics, colliders, and queries to ignifx games.

Updated Sep 5, 2026
One-click install
npx skills add https://github.com/astrum-forge/ignifx --skill physics-astrum-forge
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: physics
Source: https://github.com/astrum-forge/ignifx/tree/main/packages/physics/skills/physics
Command: npx skills add https://github.com/astrum-forge/ignifx --skill physics-astrum-forge

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @babylonjs/lite, @babylonjs/havok, @ignifx/core.

What problem does it solve? Adding realistic 3D physics to an ignifx game requires wiring up a simulation engine, synchronizing body poses with the render scene, and handling fixed-timestep stepping. This Skill provides the complete @ignifx/physics workflow so bodies, colliders, triggers, and character movement work correctly with the engine's fixed loop and interpolation. ## Core Features & Use Cases - Rigid Bodies & Colliders: Create dynamic, kinematic, or static Rigidbody components with box, sphere, capsule, cylinder, mesh, and heightfield colliders, plus physics materials and collision layers. - Character Controller & Queries: Move characters with a kinematic capsule controller and run raycasts, shape casts, and overlap queries against the Havok world. - Triggers & Events: React to trigger enter/exit and collision events from scripts, with a collision layer matrix configured in ignifx.config.ts. - Use Case: Build a 3D platformer where a character controller walks on heightfield terrain, pushes dynamic crates, and triggers a pickup zone when entering a trigger volume. ## Quick Start Ask the AI to add a falling crate with a BoxCollider and Rigidbody above a static floor using @ignifx/physics in your ignifx project.

Frequently Asked Questions about physics

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add 3D physics to an ignifx game?

Register the physics extension when creating the app with createApp({ extensions: [physics()] }), then add a collider component to make an entity solid and a Rigidbody to make it move. The simulated pose is read from entity.transform like any other node.

How do I create a trigger volume in @ignifx/physics?

Add a collider with isTrigger set to true and attach a script implementing onTriggerEnter(trigger: TriggerEvent). Trigger events carry both entities, making them the documented mechanism for gameplay reactions.

Does @ignifx/physics work in headless Node environments?

Yes, the simulation runs on a null-engine scene with no GPU, and under Node the Havok WASM binary is read from the installed @babylonjs/havok package. However, MeshCollider requires a GPU app and reports IGX-0906 in headless mode.

Why does my raycast return an IGX-0902 error?

Physics queries need at least one completed fixed step because Havok builds its broadphase during the first step. Step the app once after building the scene before calling raycast, shapeCast, or overlap.

Why is collision.other null in collision events?

Babylon Lite 1.27.0 reports collisions without body identities, so collision.other is null by default. Use trigger events for entity-aware reactions, or opt into the ADR-0013 waiver with physics({ collisionIdentities: "internal" }).

Can a physics body be a child entity in ignifx?

No, a body's entity must be a root entity because Havok writes the node's local pose directly. A parented body would be simulated in its parent's space and triggers error IGX-0907.