A 3D Game Engine written from scratch in C with OpenGL, made with the goal of mimicking Unity as much as possible.
A 3D Game Engine written from scratch in C with OpenGL, made with the goal of mimicking Unity as much as possible.
Addressing my comment on the previous devlog:
I’ve switched my collision detection model from AABB to OBB (Oriented Bounding Box), which takes into account the rotation of the objects and, by extension, the rotation of the collider itself.
I was trying an approach where I was doing a ton of math to recreate the position of each of the points of the OBB individually, but that didn’t really work well with rotations, especially along the X-Axis (no idea what that was). So instead, I just used a model matrix and did some basic transformations on that, and it worked basically first try.
Log in to leave a comment
I’ve worked on collision detection and I’ve got box to box collision working a little, I need to test it out more but from the limited amount of testing I’ve done so far, it seems to be fine.
I ran in into an issue on the way where my cube would phase through the platform after sitting on it for a couple seconds, but turns out it was just because I wasn’t adding any impulse to counteract the velocity created by gravity.
Added the basics of a physics engine with a force generator and a little bit of work on rigid bodies!
Log in to leave a comment
I’ve added support for the “Preserve Specular Light” option, and the specular light now lights all faces of the object by default.
Log in to leave a comment
To summarize the work I’ve put in until now (more than 1h 31m, of course), I have:
I’m trying to recreate Unity as much as possible, starting with the rendering system. I think soon I’ll move on to scripting and then the UI. I still have a lot of things left in the component side so I might just work on that for a while, too. We’ll see. This is going to be a massive project so I’m not too worried about spending too much time on a certain element.