I have incorporated the collision detection system in its current state into the game engine. This took some time because I was fighting with the Blender-to-THREE workflow again. Here’s a little sidebar on that.
The recommended file format for working with 3D assets in THREE is glTF. This format is maintained by Khronos Group and includes important features like materials and animations. Unfortunately, it’s also been a huge pain to work with so far. Creating assets in Blender then exporting them to glTF seems to work fine, but working with the imported assets in THREE is just quirky sometimes. When you import a file it is added as a Scene that you then have to add to an existing Scene. The geometries are all BufferGeometry objects (which is actually a good thing for performance, but difficult to work with) and you just have to really work at getting things to line up just right.
After quite a bit of tinkering my system is now working. I have a weirdly shaped concave object with a separately modeled (also concave) collision cage that I put into a map file. My engine loads the asset, recognizes the collision cage, and the collision system responds correctly when you walk around it.
This is a big step in the right direction. Next I still need to do pretty much everything from my last post, but I have a working system already integrated into the rest of the engine. Hopefully this will keep me motivated to finish the code rewrite, implement gravity, blah blah blah.