API

Function createHavokWorld

  • Create a Havok physics world and register per-frame stepping on the scene.

    The caller is responsible for loading the WASM binary externally:

      import HavokPhysics from "@babylonjs/havok";
    const hknp = await HavokPhysics({ locateFile: () => "/HavokPhysics.wasm" });
    const world = createHavokWorld(scene, hknp);

    For Large World Rendering, call enableHavokFloatingOrigin on the returned world (before creating any bodies) to opt into multi-region floating-origin simulation.

    Parameters

    Returns PhysicsWorld