Game Controller Input
in progress
Signal Linden
Add the ability to receive input from game controllers such as joysticks, Xbox controllers, etc. This will allow the creation ofhHelicopters and planes that use analog input from console controllers, attachments that control drones, arcade games, cranes, machinima puppetry, etc.
This new feature will be implemented by adding a LSL event
game_control(...)
which script authors can use to capture and respond to input from users.For further details, see https://wiki.secondlife.com/wiki/Game_control
Log In
Atomic Infinity
Axes 4 and 5 do provide analog values, from 0.0 to 1.0, I get them from using an xbox controller. 0.0 at unpressed, with proportional number up to 1.0 fully pressed. It may be that some controllers have on/off buttons at that location instead?
I have been playing with game_control quite a bit, and find the list of axes presented as it is allows me to use just the values I need, or I can pop the values into my own vectors as necessary.
NiteRider Kahane
feel like axes 4 and 5 could also report a negative value for those controllers that have full 6 axes, xbox controllers can be handled as the 0~1.0 setup, while those others can do -1.0~1.0.. the older DirectInput setup for them reports the 2 xbox controller triggers as a single axis, one as the negative side, the other as the positive side, so holding both reports a 'neutral axis' rather than as both inputs active.. the reason for the -1~1 reporting on 4 and 5 would be for example, a steamdeck using a touchpanel as a 3rd stick essentially.. heck the steamdeck's builtin gamepad could emulate 4 sticks and 2 triggers.. using the 2 physical sticks, the touchpanels and the triggers..
V
VriSeriphim Resident
It's unclear whether axes 4 and 5 (the trigger axes) are can report analog values or only 2 values (representing pressed and unpressed).
More analog axes, please. My stick has 7: pitch, roll, yaw, trim-pitch, trim-roll, trim-yaw and throttle. Some sticks have 2 throttle axes, making 8 axes.
While the page says there is room for 32 switches, only 21 are defined, which might lead viewer developers to only support 21 switches.
V
VriSeriphim Resident
I would like emphasize more axes, please. And providing definitions for all 32 possible switches.
Thanks
Vincent Nacon
I'd like to see the list of axes replaced with two vectors. LEFT_AXIS <X(JoyX), Y(JoyY), Z(Trigger)> and same thing for RIGHT_AXIS. Mainly because of performance when dealing with LSL list in general. Any other extra axes added in later on can have their own vector. I imagine that those other axes are gonna be 6DoF.
Signal Linden
in progress