Pretty specific situation here, so bear with me. I’m working on a game that is VR vs PC on a local machine, in the sense that one player plays in VR, and the other(s) play on PC using standard inputs (MKB, Gamepad). Here’s a short GIF for clarification.
We currently support the ability to add multiple PC players via split screen (for now there is only one VR player), where each PC player has a PlayerInput. The VR player does not, since up until now there’s been no need, but that has changed due to the following:
I want to make several VR control schemes, each for specific devices (Oculus, Vive Wand, WMR), and then a final “device agnostic” control scheme that would use the OpenVR bindings (RightHandXRController
and so on). Targeting specific devices with tailored control schemes really helps make each device fit the game.
Ideally, the VR player would select the control scheme for its specific device if it exists, and if not, select the generic VR control scheme.
Problem A) If I use PlayerInput with the VR player, when there is only a single PC player they can no longer auto switch between the Gamepad and PC schemes (this is undesirable).
Problem B) I’m not entirely sure how to select a control scheme without PlayerInput. Right now for the VR player I just grab a new instance of my InputActions, and then subscribe to all the events. E.g.,
InputActions inputActions = new InputActions();
inputActions.Giant.GrabRight.performed += blahblahblah
But I don’t think InputActions has any way of limiting it to a specific control scheme. Is there currently a best practices way to do this?
Thanks for any help,
Erik