Skip to content

babylon-lite: KHR_physics_rigid_bodies model (MarblesForever) fails to build physics shapes #968

Description

@cx20

Opening examples/babylon-lite with MarblesForever (KHR_physics_rigid_bodies) logs:

[glTF Physics] Failed to set up physics: Error: Cannot create physics mesh shape without vertex positions.
    at addNodeMeshes (@babylonjs/lite/es2022/lite.bundle.mjs)

The model still renders, but no rigid bodies are created, so the simulation never runs.

Repro: https://cx20.github.io/gltf-test/examples/babylon-lite/index.html?category=tutorialModels&model=MarblesForever&scale=2&type=glTF

Reproduces on both Babylon Lite 1.10.0 and 2.0.0, so it is not tied to the (erroneous) 2.0.0 release that was rolled back in #972.

The viewer builds Havok bodies by hand in setupGltfPhysics() (Lite has no glTF physics loader), and createPhysicsShape({ type: MESH, mesh, includeChildMeshes: true }) is rejecting the accumulated mesh — Lite cannot find vertex positions on it. Needs a look at where Lite keeps mesh positions (_cpuPositions?) versus what its MeshAccumulator reads.

Not a regression from any recent gltf-test change — it reproduces without them.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions