Since Playcanvas has moved to the new method of importing Ammo in the physics section of settings, I am having issues when downloading my project for self-hosting.
I do not need to import a custom version of Ammo for this project and I am happy to use the legacy version. The physics in the project work perfectly when testing in Playcanvas but when I download the project for self-hosting as I usually do, I am getting an error as shown below in the JS console.
Can I confirm you receive no other errors when you run published game? For example, the server must deliver wasm files with mime type ‘application/wasm’ else the browser will fail to load it correctly.
Looking at that project, I can see that the “enable physics” checkbox is visible, it looks like you forked that project from a project that used the legacy physics import system.
Also, I can confirm that I wasn’t writing any different code to deliver as WASM. However, this had been working pre-legacy.
Yes those are the only errors.
On top of that, I’m not sure what could be different.
This project fails even when launching from the editor.
Looks like line 202:
this.graphics.chassis = this.entity.findByName(‘ARM_Buggy’);
returns null because the object has been renamed and so later on when chassis is accessed the following output appears:
‘TypeError: Cannot read property ‘setPosition’ of null’