# BSP collisions not working in HTML5

**URL:** <https://forums.unrealengine.com/t/bsp-collisions-not-working-in-html5/393702>\
**Category:** Platform & Builds\
**Tags:** ground, HTML5, unreal-engine, bsp, Collision, question\
**Created:** [May 15, 2017, 11:00pm UTC](https://forums.unrealengine.com/t/bsp-collisions-not-working-in-html5/393702 "2017-05-15T23:00:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adrien\_Grig](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Adrien\_Grig](https://forums.unrealengine.com/u/Adrien_Grig)\
**Post date:** [May 15, 2017, 11:00pm UTC](https://forums.unrealengine.com/t/bsp-collisions-not-working-in-html5/393702/1 "2017-05-15T23:00:10Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_f0fea7ad](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f0fea7ad](https://forums.unrealengine.com/u/anonymous_user_f0fea7ad)\
**Post date:** [May 16, 2017, 8:46am UTC](https://forums.unrealengine.com/t/bsp-collisions-not-working-in-html5/393702/2 "2017-05-16T08:46:42Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Adrien\_Grig](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Adrien\_Grig](https://forums.unrealengine.com/u/Adrien_Grig)\
**Post date:** [May 16, 2017, 8:42pm UTC](https://forums.unrealengine.com/t/bsp-collisions-not-working-in-html5/393702/3 "2017-05-16T20:42:33Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_f0fea7ad](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f0fea7ad](https://forums.unrealengine.com/u/anonymous_user_f0fea7ad)\
**Post date:** [May 17, 2017, 12:13pm UTC](https://forums.unrealengine.com/t/bsp-collisions-not-working-in-html5/393702/4 "2017-05-17T12:13:42Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Adrien\_Grig](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Adrien\_Grig](https://forums.unrealengine.com/u/Adrien_Grig)\
**Post date:** [May 23, 2017, 8:23pm UTC](https://forums.unrealengine.com/t/bsp-collisions-not-working-in-html5/393702/5 "2017-05-23T20:23:57Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![Adrien\_Grig](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Adrien\_Grig](https://forums.unrealengine.com/u/Adrien_Grig)\
**Post date:** [May 29, 2017, 5:38am UTC](https://forums.unrealengine.com/t/bsp-collisions-not-working-in-html5/393702/6 "2017-05-29T05:38:24Z")

</div>

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