| ENTRY | DOWNLOAD | MANUAL | ONGOING | |
onJoyHatMotion()Method that is called when the hat of any connected joysticks changes position. Modern joysticks usually have three analog axis, a hat (digital joystick) and anything from four buttons upwards. This event handler method is fired in the world. Joysticks are automatically initialized when Slut starts.
class Atlantis(World):
def onJoyHatMotion(self, event):
pass
Relevant examples: joystick.py In Context
class Atlantis(World):
def onSetup(self):
self.name = "Joy"
def onJoyHatMotion(self, event):
print 'Joystick Hat changed position.'
print 'Joystick that has fired the event:', event.joy
print 'Current hat position:', event.hat
|
|
|
Initiated by Stephan Hechenberger Thanks to CADRE's 103 |
|