Oculus to vive

I have designed my VR game to work on both the Vive and the Rift. The only thing you have to do to switch between hardware systems is physically unplug one and plug the other in. No code recompiles or reconfigurations are necessary.

The key is to abstract away the VR hardware via a hardware abstraction layer (HAL). UE4 already does this to a large degree, but there are still going to be some hardware differences (such as the play space origin, HMD height, etc). The best practice is to create your own HAL. Adding support for additional hardware becomes very straight forward and easy: Just add support for it in the HAL and expose access to it through an API. The design principle should be, “use the feature if its available, but otherwise fail gracefully”. So, if your user is using the Oculus Touch, Vive Knuckles, or Leap Motion, your game shouldn’t really care where it gets input from, it should just say, “set the thumb bone rotation to this value on whatever character we’re controlling.” Likewise with haptics support. Likewise with motion controller support. Likewise with HMD support. Adding support for the PSVR, Rift, Vive, whatever, should all be done in the HAL and the API would be unchanged :slight_smile: