create single-joystick movement function in lib