My physics/collision side quest didn’t go so great. I’m going to put the new component down for now. I could spend another week on it at least before getting it right - and there’s just so much more to get done for the new Glace. So it’s back to my previous physics component for now. All is not lost though. I learned a few new things a long the way.
I didn’t have a good intuitive grasp of the dot product operation until recently. Now I understand that it basically tells us how similar two vectors are. It turns out this is really useful. For two normalized vectors that point the same direction, the result is 1. If they point the opposite directions their result is -1. As two vectors become perpendicular, their result approaches zero.
We can use this to determine how an object should bounce off a surface given the object’s velocity and the normal of the surface. We can also use it to simulate the difficulty of walking up steep inclines or the ease of walking down a slope. Very cool.
I drew a few new tiles for the grassy meadows tile map this morning. These are roof shingles to add to the tops of some buildings. Here’s a quick screen grab from Photoshop. Cheers!