BSP collisions not working in HTML5

Hi,

I’ve been struggling with a weird problem.I’m developing a simple 3D environment in which you can walk around and ideally I would like to publish it in HTML on a website.

I made some tests and everything worked fine until my 1st person character kept falling through the ground, but in a weird way, as if the character would spawn inside the BSP (even if I’m sure it doesn’t). So I started a new project, and after working out the geometry in BSP, the problem still happens, even if I replace the BSP with a static mesh. But it only happens in HTML launcher or package - not in the Windows executable. Although collisions work fine with static meshes not created from BSP.

My guess is that the BSP collision system (even if converted to static mesh) is in some way incompatible with the HTML packaging… But then I don’t undestand why it worked temporarily in the 1st project… Is there some way to set the right collision without having to replace all my geometry with new meshes?

Thanks a lot for the help :slight_smile:

Perhaps this might be something due to float vs double precision in asm.js, or unaligned vs aligned memory access in asm.js. New WebAssembly mode will will have single precision floats and unaligned memory accesses, so it would be good to test with WebAssembly once that becomes available - current Github master branch has it so I believe it will be in UE 4.16.

Thanks a lot for the answer! That could be an explanation - even if I’m not sure to understand everything you said but I get that it has to do with the way HTML treats data.

Is there a way to verify this? Like packaging in the UE4.16 preview?

If UE 4.16 preview has WebAssembly support, then that can be used to verify. You can check WebAssembly by seeing if there are files with .wasm suffix generated, or if there is an UI option in the export settings that mention WebAssembly.

Hi, sorry for the late answer I’ve been busy all week. Thanks a lot for the help! For now I actually replaced my floors with static meshes so it should work but I’ll see if I can get some time to try what you suggested :slight_smile:

Just for the heads up, the problem seems to be solved on 4.16 when using WebAssembly :slight_smile: