Today I finally got the collision detection for my current game project functional. There are still a few minor bugs in certain sitatuations, but basically it’s working. For now I just implemented an Octree for spatial partitioning and only Lines, Spheres and OBBs as collision geometries. For the implementation I referred to the books “Real-Time Collision Detection” by Christer Ericson and “3D Game Engine Architecture: Engineering Real-Time Applications with Wild Magic” by David H. Eberly.
The whole implementation was way more complicated than I thought and it took a while to get everything working as I wanted it to. I’ve learned quite a bit doing this dirty work myself, but for future games I will probably make use of an existing physics engine.
The following screenshots shows how I used just the simple given types of collision objects to model a test level:
Next I’m gonna try to create simple vehicle physics. My goal is just to make it fun driving around, not so much being realistic.
Leave a Reply