Does anyone have a good routine for emulating joystick control with a a standard mouse? I am only looking to emulate the four basic directions: forward, back, left and right.
Thanks in advance!
Thanks in advance!
;Try this in your main update loop mx = MouseX() my = MouseY() If MouseXSpeed() > 1 MoveMouse mx + 1,MouseY() ElseIf MouseXSpeed() < -1 MoveMouse mx - 1,MouseY() EndIf If MouseYSpeed() > 1 MoveMouse MouseX(),my + 1 ElseIf MouseXSpeed() < -1 MoveMouse MouseX(),my - 1 EndIf
centerx = GraphicsWidth() / 2 centery = GraphicsHeight() / 2 sensitivity = 100;Raise this to decrease sensitivity, lower it to increase it ;The "MouseStick" (har har) test/update code ;jx & jy are the replacement vars for JoyX() & JoyY(), of course jx = centerx - (MouseX() / sensitivity) jy = centery - (MouseY() / sensitivity)