blender/source/gameengine
Mitchell Stokes f2f2b6153a BGE: Adding a Python interface for handling joysticks without needing logic bricks. These new SCA_PythonJoystick objects can be accessed using bge.logic.joysticks, which is a list of joysticks. The length of the list is the number of maximum supported joysticks, and indexes that do not have a joystick available are set to None. This means joysticks can be checked for using something like:
if bge.logic.joysticks[0]:
    activate_player_one()

if bge.logic.joysticks[1]:
    activate_player_two()

etc..

The interface exposed by SCA_PythonJoystick is very similar to the joystick logic brick except for one key difference: axis values are normalized to a -1.0 to 1.0 range instead of -32767 to 32767, which is what the logic brick exposed.
2012-12-21 02:28:59 +00:00
..
BlenderRoutines code cleanup: warnings 2012-12-19 01:48:54 +00:00
Converter code cleanup: warnings 2012-12-19 01:48:54 +00:00
Expressions Added GPL header to sconscripts! 2012-12-17 08:01:43 +00:00
GameLogic BGE: Adding a Python interface for handling joysticks without needing logic bricks. These new SCA_PythonJoystick objects can be accessed using bge.logic.joysticks, which is a list of joysticks. The length of the list is the number of maximum supported joysticks, and indexes that do not have a joystick available are set to None. This means joysticks can be checked for using something like: 2012-12-21 02:28:59 +00:00
GamePlayer style cleanup 2012-12-20 00:29:31 +00:00
Ketsji BGE: Adding a Python interface for handling joysticks without needing logic bricks. These new SCA_PythonJoystick objects can be accessed using bge.logic.joysticks, which is a list of joysticks. The length of the list is the number of maximum supported joysticks, and indexes that do not have a joystick available are set to None. This means joysticks can be checked for using something like: 2012-12-21 02:28:59 +00:00
Network Added GPL header to sconscripts! 2012-12-17 08:01:43 +00:00
Physics Added GPL header to sconscripts! 2012-12-17 08:01:43 +00:00
Rasterizer style cleanup 2012-12-20 00:29:31 +00:00
SceneGraph Added GPL header to sconscripts! 2012-12-17 08:01:43 +00:00
VideoTexture Added GPL header to sconscripts! 2012-12-17 08:01:43 +00:00
CMakeLists.txt code cleanup: use system includes for cmake, otherwise warnings get printed in headers. 2012-09-18 04:40:20 +00:00
SConscript Added GPL header to sconscripts! 2012-12-17 08:01:43 +00:00