23 May 2026

Glint: Dev diary III - Rotational hazard

rotational hazard

In my last video update I had loose thoughts of adding a parent-child type of system, where an entity could be attached to a parent, and follow along for position and rotation. Position is fairly straight forward, whereas rotation turned out to be a sink hole.

For such a system to work you will need a world space, where the parent lives, and a local space, where the child lives. The local space is centered on the parent, and the child takes on the world space + the local space. Up until now I had not thought very hard about rotations, and had gone for a forward vector + an up vector for determining rotation. While this is fine, it turns out that most game engines use Quaternions, for good reasons. They don’t get gimbal lock, they are better at interpolation, and they make you appear smart when you mention that you have them in your engine.

Understanding

They have some drawbacks as well.

  • They are very hard to understand.

  • They are very hard to explain.

Thankfully, the internet comes to the rescue with some really good AND PRACTICAL resources for understanding how they work.

https://eater.net/quaternions has an absolutely awesome interactive learning experience, where they combine videos explaning the concept and the ability to change the numbers on the screen and see the visualization in real time. This gives a very good way experiment with the concept in real time, using the very material that is used to explain them.

It is also a master class in how to break down information into edible chunks. Not too much, so as to overwhelm you, but not too little either, giving you something to chew on.

And with that food metaphor, I think it might be time for lunch for me. Adios.

Tags: clojure gamedev