Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: footman on January 25, 2017, 07:59:48 AM

Title: Does NGUI support VR?
Post by: footman on January 25, 2017, 07:59:48 AM
I have an application that want to convert it into Occlus VR, but when I try to put VRInput into NGUI, I met so many problems. So does NGUI support VR? Or is there any example showing how to use it?

Thanks
Title: Re: Does NGUI support VR?
Post by: Holy Manfred on January 25, 2017, 12:43:59 PM
You can always render your UI into a render texture and then use it accordingly, depending on your VR environment. Just rending the regular 2D NGUI camera won't work in VR. If you put your UI into a render texture you can render it any way you want.
Title: Re: Does NGUI support VR?
Post by: ArenMook on January 25, 2017, 01:59:02 PM
You need to use a 3D UI instead of a 2D UI. NGUI just creates renderable objects -- so if they're in 3D space, it will work as expected.
Title: Re: Does NGUI support VR?
Post by: footman on January 25, 2017, 11:38:48 PM
Thank you, I have used render texture to see the UIs in VR,but cannot receive the input by TouchPad in GearVR. The Samples for Occlus SDK is only for GUI in Unity, not for NGUI. How NGUI got the input from OVRInput?
 
Title: Re: Does NGUI support VR?
Post by: ArenMook on January 30, 2017, 07:05:57 AM
You need to create a custom controller type. NGUI's control sources are all set up as delegates in UICamera. Look for UICamera.onCustomInput. You can also overwrite UICamera.GetTouch, GetMouse, and all the other input delegates with your own.