Creating the compass

 

The model

The reference.

My original compass model in game.

(Check out Frank’s Artstation. He also writes detailed guides on hard surface modeling techniques on Polycount. If you are a modeler, you’ll want to read his work here.)

Franks improved model.

 
 

I created the first compass model myself. I had a Cammenga model (the military type with Tritium sights) that I used for reference. I took many photos of it and went to town in Maya.

The model was fine. Convincingly realistic. But it had a flaw. The ruler ticks weren’t perfectly accurate. After the 2,000 meter tick, it was a few millimeters off.

In most games that would not matter. But in LANDNAV, you rely on the compass completely. It must be perfect.

At that point in development, I had my hands full and the thought of digging back into the compass model files to fix this issue didn’t sound like fun. So, I reached out to a guy I knew from Polycount who is a guru when it comes to creating ultra-realistic models of tools and hardware.

I commissioned a new model, and the results were outstanding.

Frank’s compass is completely realistic in every way. I thought mine was pretty good, but it’s nothing compared to the work of a true specialist in the field.

Since the compass is the number one model you see most often in the game - and view it very close - having that high degree of realistic detail I think imparts a strong sense of authenticity. And that is what LANDNAV is all about.

 

Making it point north, except real compasses don’t point exactly north.

 

Making the compass point north in Unreal is really easy. You just grab the “point this direction” node and type in “north.”

I wish. It’s a little more complicated than you’d expect. “Make a compass for your game” is a really popular tutorial you can find on Youtube, created in many different ways by many people…but there is a difference between typical video game compasses and a precisely realistic compass.

My solution in Unreal blueprint

Where it gets tricky is with the Grid to Magnetic deviation. In the real world, compasses and maps don’t point to the same north. The Earth’s magnetic poles aren’t actually at the very top and bottom of the globe, so depending on where you are in the world, your compass will have a deviation compared to your maps north/south gridlines.

See the two functions: Subtract GM Angle from Magnetic North and Add GM Angle to Magnetic North? That’s where some real math happens - stuff that goes beyond the high-school algebra I topped out at.

My initial calculations worked…sort of. I was able to make it so that the player has to subtract the GM angle when converting from map to compass, but this is opposite from the way it’s meant to work!

Hey dummy, why not just invert the values then? That’s the obvious thing to try, but it doesn’t work that way. It gets a bit tricky in 3d land because we don’t just have one coordinate space to consider, but each actor has to consider their relation to other actors as well - especially if they are attached in a parent-child relationship. And the relationship the compass has with the player has several states, adding further complications…

This is what I call “figuring out what you didn’t know you needed to know.”

Funnily enough, the practice of LANDNAV is a fantastic way to teach a person about this principle. People who are new tend to be either dangerously overconfident or detrimentally lacking in confidence, depending on their personality. But experience humiliates the ego and likewise empowers the meek - in the end we end up with a more balanced and realistic perspective about what we do actually know, and how we can discover that which we don’t.

And the method is simple: log miles. Do work.

So, in the end we now have a compass that operates just as a real-life compass would. Players will need to consult the instructions on the map key for info about accounting for the GM angle - exactly as they would have to in the real world. If they forget to - well, over the course of a kilometer that could mean being several hundred meters off from your target.

Initially I had decided to simplify the game by defining the GM angle as 0 degrees. But I was afraid that if players got in the habit of not considering the GM angle, and then they try to do some orienteering in real life, that bad habit they’ve developed could cause serious problems!

So, it was a battle to get the compass working precisely as it should, but I think it was one that had to be fought. LANDNAV is all about paying close attention to details, and having the strategic mind to fight the right battles and avoid the wrong obstacles!