Ball motion detectors (or shake/tilt switches) work as you describe. They typically have several metal rods on which the ball will rest on two at any given time. The impossible combinations (too far away to span with the ball) are often bridged together for simplicity. Detection is done by monitoring for changes in the connectivity between 3 or more contacts.
I'm really trying to find a diagram of it, but my searches aren't yielding much.