Skyrim VR, VRInput, and Action Bindings
Added 2020-01-10 04:17:55 +0000 UTCRecently I've put redesigning RaceMenu on hold to focus on integrating SteamVR's Action Bindings mechanism into SKSEVR. This requires internally upgrading the input system and emulating the legacy inputs so the game doesn't completely break. So far I have a working prototype of this but I don't possess all controller types to properly test whether they all work so I've put my efforts into making sure at least the Index controller is correctly supported for SkyrimVR without any special controller simulation.
So far this has been a success, SkyrimVR will for most purposes treat Index controllers similarly to how it treats Oculus controllers with respect to processing input and showing button callouts. With legacy bindings this was normally done by "Simulate Controller Type" where you picked a controller to simulate so that the thumbsticks and A button would work when using the Index controllers. With action bindings this is no longer necessary and is done internally by SKSEVR, that is to say future controllers might not have the best time as Skyrim would most likely treat them similarly to Vive controllers by default, this can be fixed when that time comes. Along with semi-native support for Index controllers this also means that Thumbsticks and Trackpad on the Index are now treated as different inputs.
You may be thinking, why Action Bindings at all? What benefit is this system over the legacy system? Well, Action Bindings effectively abstracts what a button or input is on a device from an action in the game, or even a spatial coordinate. The game does not need to know what kind of controller you have, just what actions are available and what kind of data they contain. This means that SKSEVR can expose actions that can be bound to any controller, and SKSEVR plugins can utilize the input from these devices.
For example:
I could expose "/actions/body/foot" as a "pose" binding, you could then map that action to a tracker on your foot that you have connected to SteamVR and then an SKSEVR plugin could query the spatial pose of that action to then make use of it for gameplay or other purposes.
Additionally, the Action Binding system exposes the built-in SteamVR skeleton which allows accessing the finger/pose tracking API from the Index controllers.
Summary:
Pros
- Finger tracking from Index controllers (or other tracked devices)
----- While this means finger tracking can be utilized, it does not mean it is usable out of the box, some plugin must do the work to translate the matrix and overlay it onto the game's actual hand skeleton
- Easier mapping of new device data for plugin use
- Semi-native support for Index controllers
Cons
- Legacy SteamVR bindings don't work, if you've modified bindings via SteamVR you may need to create them again, or let it use the SKSEVR provided defaults
- You can only edit your Action Bindings while the game is running because Steam doesn't seem to be able to find a local action manifest file and must be told where it is at runtime
This is not normally enabled in the prototype and must be turned on explicitly, but with enough testing I am hoping to enable Action Bindings by default in future releases.