Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
RoryLaneLutter's avatar
10 years ago

Cross Development between Rift and Mobile input module.

I'm trying to cross develop between Oculus Rift and Mobile.

I'm looking for advice on the next steps of integration for my input module Unity 5+ and Oculus Rift .7+

My strategy thus far has been to extend Unity's PointerInputModulee to create a virtual cursor in 3D space that imitates the behavior of touch input from a mobile device.

This way you can create one GUI system which will work identically in VR or on Mobile.

Here's the link for WIN 64 http://www.arthavoc.com/VR_Cursor/VR_Cursor_Builds.7z

Here's the link to the package http://www.arthavoc.com/VR_Cursor/VR_Cursor_Package.unitypackage

I'm basically trying to perfect this solution, and I'm looking for some advice or criticism of what I've got so far. Currently, I'm using some Platform Defines in Unity to designate whether or not the device is android or Rift, and that does a decent job of telling it whether to use the virtual cursor or real touch input to process events. The last little piece I have to perfect is, if in the Unity preview mode, I need to set it to move the virtual cursor to the system cursor's position prior to processing fake touch events.

That way, I can export to rift by building to PC with "rift enabled" checked, which will use relative mouse offset to drive a virtual cursor, preview in Unity using the system cursor as touch events, or export to android.

Any input or advice would be appreciated.