Correct way to load havok?

i tried load from local folder and not work:

u put manually in folder this file :
image
without that :

Babylon.js v6.36.1

cc @RaananW

initializing havok :

When you init any package compiled by emscripten (like havok) you can pass the URL of the wasm file, otherwise it will search for it in the default location.

What you need to do is when you run new HavokPlugin() provide an options object:

new HavokPhysics({
  locateFile: (path, scriptDirectory) => {
    // path is "HavokPhysics.wasm", scriptDirectory is the location of the current script, in case you need them
    return TheURLOfTheWasmFile;
  }
});

Solved, I found the .wasm file on another site, instead I used this:

1 Like