Brian Crick

Keep Your Head Up

Just a quick Tinselfly thought today.

[fergcorp_cdt]

Been working on getting my character to stick to this round world I’ve created, and made some good progress last night.

I was flailing for a while though. When you moved, the character would kind of do cartwheels and eventually settle on the right orientation. It was kind of amusing, but I was all like, omg! I’ll never get quaternions! And I kept changing my math around and reading Wikipedia stuff on quaternions and watching Youtube videos about quaternions, and none of it helped.

But it turns out my understanding of this was fine. The issue was that I was writing a script to make sure the character’s feet were always pointing towards the center of the world, and I had a separate script made a long time ago that was trying to make sure that she was always pointed in the direction she was moving, with her feet pointed down in absolute coordinates. So the scripts were fighting with each other.

So it’s just a reminder of how important it is to know what you know, and know what you don’t. It’s sort of the opposite of the whole if your only tool is a hammer, all your problems will look like nails thing. I convinced myself my problem was a nail, and refused to use any tools on it that weren’t hammers.

I don’t know, mathematically, how quaternions work, but I do know how to use them in Unity. I should have realized that and looked for other sources of my cartwheeling problem sooner.

This week, I’ll work on refining my maze generation and high-level world building system.

Copyright © 2017 Brian Crick.