IMU-based magic wand