/* Wiimote Google Earth interface script. * Requires a sensor bar for cursor movement. */ var.ButtonFreezeTime = 250ms var.PointerBump = KeepDown(Pressed(wiimote.A),var.ButtonFreezeTime) or KeepDown(Pressed(wiimote.B),var.ButtonFreezeTime) Wiimote.Led1 = true Wiimote.HasNunchuk = true Wiimote.HasClassic = true Wiimote.HasBalanceBoard = true /* Mouse */ //Cursor movement if wiimote.PointerVisible but not var.PointerBump then mouse.x = wiimote.PointerX mouse.y = wiimote.PointerY end if //Select spot on map mouse.LeftButton = Wiimote.A and KeepDown(Wiimote.PointerVisible,0.5s) /* Zoom */ //Zoom in if Wiimote1.Nunchuk.CButton then mouse.WheelUp = true wait 30ms mouse.WheelUp = false wait 30ms end if //Zoom out if Wiimote1.Nunchuk.ZButton then mouse.WheelDown = true wait 30ms mouse.WheelDown = false wait 30ms end if /*Horizontal and azimuth movement*/ //Move forwards Key.Up = Wiimote1.Nunchuk.JoyY < -20% //Move backwards Key.Down = Wiimote1.Nunchuk.JoyY > 20% //Move left Key.Left = Wiimote1.Nunchuk.JoyX < -20% //Move right Key.Right = Wiimote1.Nunchuk.JoyX > 20% //Change azimuth, used in conjunction with thumbstick Key.LeftShift = Wiimote1.B //Return to North = Up and "Top-down" view Key.R = Wiimote1.Home Key.Space = Wiimote1.Minus