Game Controller Input
planned
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
Toothless Draegonne
Wait what? Come on, it's 2025 and there's no game controller support. That was an anachronism in 2003, let alone now. Why the sudden extra delay?
Atomic Infinity
I am going to vent my ongoing frustration....
The first post in this thread from December 2023 says that this is 'In Progress'. It was indeed true - we were actively using and testing it on Beta grid since October 2023.
An updated status set here at March 2025 downgrades it to just 'Planned'.
Leviathan Linden's test viewer already works very well, has a working UI, and all the server and LSL script functionality is already deployed on the main grid (8 months ago). Why stop now? It is quite tragic how all Leviathian's hard work on this gathers virtual dust, because its been deemed a low priority by the LL decision makers, and is not being included in RC viewers.
Does this downgrade to just 'Planned' mean its basically back to the bottom of the viewer priorities list (again)? SL must be one of very few virtual spaces/games where in 2025 you can't use analog input game controllers to do stuff.
99% of Game_Control in SL is that one checkbox in the viewer 'Send Game Control Data to Server'. With that alone, the creators can get busy.
We don't actually need a complex UI in the viewer Preferences, basic is fine. There is always the option to update again later when there is feedback about what the users need that UI to actually do.
Game_Control needs to be INCLUDED in the RC viewers at least, not shoved out the back like it has been now for well over a year.
davidventer Resident
Just gonna leave this here: https://developer.apple.com/documentation/gamecontroller?language=objc
SarahKB7 Koskinen
I hope all generations of PlayStation controller pads are included in this feature.
Signal Linden
planned
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.
If you wanted a new value of a trigger axis to be of a wider range (like -1.0 to +1.0), you could just do something like newvalue = (axisvalue * 2)-1.0 I guess my point being that with a tiny math modify, we can make the axis values be whatever suits our own purposes, as its not going to be possible to make all axes in all the different formats for all the different joysticks.
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..
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.
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