Rabid Squirrel Games is proud to announce our first contribution to the game development community! pyPad360 is a Python class that provides an easy to use interface for Xbox 360 controllers for the Panda3D game engine. pyPad360 achieves its magic by translating the joystick input messages from the pygame library and mapping them to Xbox360 buttons and analog sticks.

Here is an example of the messages pyPad360 sends when a button/axis is pressed. pyPad360 takes care of the pygame joystick event messages and converts them to easy-to-understand Xbox 360 controller messages.

pyPad360 pygame
C1_A_DOWN JoyButttonDow: Joy=0, Button=0
C2_LB_DOWN JoyButtonDown: Joy=1, Button=4
C1_DPAD_DOWN JoyHatMotion: Joy=1, Hat=0, Value=(0,-1)
C2_LSTICK_SLIGHTDOWN JoyAxisMotion: Joy=1,

The following python script demonstrates how to use pyPad360 with Panda3d:

Please download the pyPad360 package for full documentation on pyPad360.

Note: pyPad360 is not intended to be the ultimately optimzied solution for this problem. It is a starting point and is geared toward easy usability to enable Panda3D developers to encorporate an Xbox 360 controller into their games. If you make changes that you feel make pyPad360 better, please feel free to submit your source to us. If we use it, we will give you full credit!