You can try joystick implementation that @Maru shares in this thread: Easily add a controller like joysticks and D-pads