I want to create a compass that is moveable around a sphere ("earth"). It's orientation should always be tangential to earth's surface, it's location the same as a second object and it should always point to a fixed point on the sphere ("magnetic north").

I am trying to visualize how a compass/heading indicator behaves in order to display the difference between true (geographical) north, which is the axis of revolution of the sphere, and magnetic north for airplane navigation.

I set up an earth, a marker as a pole, an airplane, a housing and a compass needle. To be as close as possible to how this looks in the plane, I want the housing to contain directional information, whereas the 'needle' is fixed to the axis of the plane (compare https://en.wikipedia.org/wiki/Heading_indicator).

I managed to move the airplane tangentially to the earth by placing it on the "north pole" and then put the origin to the center of the earth. By now rotating it around the origin, it moves along the surface and stays tangential.

I'm able to keep the 'compass needle' aligned to the airplane by using the airplane as parent.

My problem is to find the correct constraints to keep the housing with the directional information on it in the right spot (on the airplane) and with the correct orientation.

I tried to use the constraints "track to / locked track to" to keep it facing the pole-marker, which works as long as I do not couple it to the movement of the airplane.

Coupling the housing to the airplane did also work, but then I'm losing the facing.

I tried to:
- permutate the order of the constraints
- played around with world space/local space
- different combinations of placing the individual origins.
- use of armature/bones

I'm also quite new to blender (using version 2.76), so I'm pretty sure I did stupid things and am missing the easy solution. But nonetheless I decided it's time to ask for help :-)

If you have any ideas or comments on this - I'm thankful for every help.

  • 1
    $\begingroup$ First, parenting the airplane (and compass) to a point in the center of the "earth" would make this much easier. Then you would only have to track to the pole while locking whatever the "up" axis is. $\endgroup$ – JakeD Aug 28 '16 at 17:27

Damped track, locked track.

enter image description here

The compass has a limit distance/surface constraint to keep it on the surface of the earth. There are other options. It uses a damped track constraint to keep its local -Z axis pointing at the center of the earth.

The needle is parented to the compass. It uses a locked track constraint to allow it to rotate in only a single axis. It tracks a marker I've placed at the sphere's pole, parented to the sphere.

No matter how you move the sphere or the compass, the compass will remain glued to the surface of the sphere and oriented with it, and the needle will point at the north pole.

Your own axes are going to depend on how your orient your objects. I've used empties here for my constraints, but strictly speaking, they're unnecessary; you can give constraints directly to objects and they will behave the same.

If you want to do it to something that's not a sphere, you might no longer be able to just use the origin of the object (definitely not for a limit distance constraint), but you can use shrinkwrap constraints instead, and you can locked track empties that are shrinkwrapped to non-rendering, negatively displaced copies of your mesh to acquire orientation.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.