RecastJS plugin is broken

@Cedric is RecastJS plugin broken with Babylon.js v5.0.0-alpha.43 - WebGL2

I am getting below error:
BJS - [16:37:25]: RecastJS is not ready. Please make sure you await Recast() before using the plugin. Uncaught TypeError: this.bjsRECAST.Vec3 is not a constructor

also live example is not working
https://playground.babylonjs.com/#TN7KNN#2

Thanks

Let me fix that!

2 Likes

PR is live

3 Likes

@Cedric I updated with PR and also latest release Babylon.js v5.0.0-alpha.44 but still receive above error:

BJS - [16:37:25]: RecastJS is not ready. Please make sure you await Recast() before using the plugin. 
Uncaught TypeError: this.bjsRECAST.Vec3 is not a constructor

any idea what I would be doing wrong?
I see on PR you have updated navMeshWorker.js which comes after I init the plugin, the error appears as soon I add
var navigationPlugin = new BABYLON.RecastJSPlugin();

Thanks

I check the above playground and copied this code in my script


window.initFunction = async function() {
                    await Recast();
                    }
window.initFunction();

which fixed the issue.

2 Likes