Building for WebGL


This is a bit of a shorter devlog aimed at recounting our experience with building the game for WebGL.

Firstly, we should have been building and running the game much earlier than we did. The first build was made on the tuesday before the testing session, and we discovered issues we didn't realise we had. The main issues were: 

1) The mouse-look input system did not function properly with WebGL, and 2) meshcolliders did not work properly.

The first issue took hours to figure out, but it boiled down to the new Unity input system did not input every single mouse movement, only some when it felt like it. This was a huge issue because it caused the camera to be very clunky and not smooth. This issue was ONLY with mouse and keyboard, since the movement for a joystick on a controller worked perfectly fine and the input was processed with every movement.


The second issue was an issue with mesh colliders in webgl that has been around for at least 6 years according to the forum posts about it. Essentially a mesh collider will not function as a collider UNTIL it has touched a box collider. Why? no idea. why hasnt it been fixed in 6 years? also no idea. So we had to replace all our island meshes with just plain box colliders for testing day. This has the unfortunate effect of making the land look extremely flat (because it was) and removing any perception of depth testers had. 


All in all the takeaway from this is. BUILD YOUR PROJECT in advance and not the day before.

Leave a comment

Log in with itch.io to leave a comment.