| ENTRY | DOWNLOAD | MANUAL | ONGOING | |
onJoyAxisMotion()Method that is called when any of the analog parts of a connected joystick is moved. 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 onJoyAxisMotion(self, event):
pass
Relevant examples: joystick.py In Context
class Atlantis(World):
def onSetup(self):
self.name = "Joy"
def onJoyAxisMotion(self, event):
print 'Joystick has been moved.'
print 'Joystick that has fired the event:', event.joy
print 'Axis that has fired the event:', event.axis
print 'Current position of that axis:', event.value
|
|
|
Initiated by Stephan Hechenberger Thanks to CADRE's 103 |
|