Forum Discussion
Anonymous
10 years agoUnityVr vs Oculus Utilities
Hi guys! I'm at a confusion point... I'm reading two separate docs: Oculus Utilities: https://developer.oculus.com/documentation/game-engines/latest/concepts/book-unity/ UnityVr:https://un...
Conz
10 years agoExplorer
Thank you for your response.
I don't think that the dead zone is the problem. I don't have a control for vertical movement with the controller. The strange thing is, that your gaze pointer (UI project) has an offset (when the shifting is happening), too. It detects the colliders with an offset of where they are in the world.
Yes, that seems to be the reason for my problems. I thought that is the sample scene, how to use the OVR Utils.
Maybe the RaycastAll more flexible and is needed for some UI effects, but has some nasty side effects, like detecting the gazeable objects through walls and through "non gazeable objects". And RacastAll with sorting seems unnessesary slow. From user point of view, I can't imagine a situation where I would need this.
In all my tests a simple Ray with a check if the collider is "gazeable" is much faster and gives the result I would expect from a gaze pointer.
Maybe I don't get this. How can I change the controlls? Not with the Unity input settings, right? The only way I found was to modify the OVRInput.cs. And as an example there the button method.
The logic with the Spherecast. Or is the Spherecast not for the mouse?
Maybe it will be different in the future (comment from code: "// In future versions of Uinty RaycastResult will contain screenPosition so this will not be necessary")
Unity Verion 5.3.2p2 on Win7 64
Oculus 0.8
And the UI-Demo from your link.
Ok, my problem seems than, that I'm mixing the OVR Utils and the VR UI project here. The UI-project is your official demo scene, how to implement the controller and a gaze pointer. It shouldn't throw warnings. Please update the demo scene to your own API and current unity version.
Messages I get with your scene:
"OVRGamepadController has been deprecated and will be removed in a future release. Please migrate to OVRInput. Refer to the documentation here for more information: https://developer.oculus.com/documentat ... -ovrinput/"
"Assets/Scripts/ParticleGazeCursor.cs(88,20): warning CS0618: `UnityEngine.ParticleSystem.emissionRate' is obsolete: `emissionRate property is deprecated. Use emission.rate instead.'
"
"Assets/Scripts/OVRInputModule.cs(97,14): warning CS0114: `UnityEngine.EventSystems.OVRInputModule.Reset()' hides inherited member `UnityEngine.EventSystems.UIBehaviour.Reset()'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword"
Not wrong, over complicated.
- Your input logic without using the input settings.
- The RaycastAll with the cloning of the PointerEventData
Please make it "KISS" as possible. I'm only a scripter, not a programmer. Maybe I have a problem to understand all your reasons to build the API and the Demo scene the way you do.
After some days trying to implement your example UI demo logic in my project I have dropped it and build my own character controller and GazePointer.
"vrdaveb" wrote:
You mean OVRPlayerController? Sounds like dead zone is too tight for your controller. In a future release, we're planning to increase it a little to prevent this. In the meantime, can you change the 0.15f dead zone in OVRInput.cs to 0.2f?
I don't think that the dead zone is the problem. I don't have a control for vertical movement with the controller. The strange thing is, that your gaze pointer (UI project) has an offset (when the shifting is happening), too. It detects the colliders with an offset of where they are in the world.
"vrdaveb" wrote:
It sounds like you're using the sample VR UI project from our blog (https://developer.oculus.com/blog/unity ... tem-in-vr/). That isn't part of the Utilities, it's a drop-in replacement for the usual mouse-driven input modules in UGUI. It implements Unity's GraphicRaycaster interface, which returns all hits in sorted order. This is more flexible than Physics.Raycast and Unity probably needs it for a number of corner cases in their UI logic.
Yes, that seems to be the reason for my problems. I thought that is the sample scene, how to use the OVR Utils.
Maybe the RaycastAll more flexible and is needed for some UI effects, but has some nasty side effects, like detecting the gazeable objects through walls and through "non gazeable objects". And RacastAll with sorting seems unnessesary slow. From user point of view, I can't imagine a situation where I would need this.
In all my tests a simple Ray with a check if the collider is "gazeable" is much faster and gives the result I would expect from a gaze pointer.
"vrdaveb" wrote:
OVRInput is designed to be similar to UnityEngine.Input, which drives the undocumented CrossPlatformInput class's StandaloneInput back-end. Unity prefers not to include any Oculus-specific code in their Standard Assets, but we are still working with them to expose this in a cross-platform way.
Maybe I don't get this. How can I change the controlls? Not with the Unity input settings, right? The only way I found was to modify the OVRInput.cs. And as an example there the button method.
"vrdaveb" wrote:
Which logic is that?
The logic with the Spherecast. Or is the Spherecast not for the mouse?
Maybe it will be different in the future (comment from code: "// In future versions of Uinty RaycastResult will contain screenPosition so this will not be necessary")
"vrdaveb" wrote:
I'm unable to reproduce this. What Unity version and Utilities version are you using? What is the warning? Is it in OVRInput.cs or OVRInputModule.cs?
Unity Verion 5.3.2p2 on Win7 64
Oculus 0.8
And the UI-Demo from your link.
Ok, my problem seems than, that I'm mixing the OVR Utils and the VR UI project here. The UI-project is your official demo scene, how to implement the controller and a gaze pointer. It shouldn't throw warnings. Please update the demo scene to your own API and current unity version.
Messages I get with your scene:
"OVRGamepadController has been deprecated and will be removed in a future release. Please migrate to OVRInput. Refer to the documentation here for more information: https://developer.oculus.com/documentat ... -ovrinput/"
"Assets/Scripts/ParticleGazeCursor.cs(88,20): warning CS0618: `UnityEngine.ParticleSystem.emissionRate' is obsolete: `emissionRate property is deprecated. Use emission.rate instead.'
"
"Assets/Scripts/OVRInputModule.cs(97,14): warning CS0114: `UnityEngine.EventSystems.OVRInputModule.Reset()' hides inherited member `UnityEngine.EventSystems.UIBehaviour.Reset()'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword"
"vrdaveb" wrote:
Sorry, but I need more detail to understand what is wrong here. Can you describe what part of the workflow is too complicated and how you would like it to change?
Not wrong, over complicated.
- Your input logic without using the input settings.
- The RaycastAll with the cloning of the PointerEventData
Please make it "KISS" as possible. I'm only a scripter, not a programmer. Maybe I have a problem to understand all your reasons to build the API and the Demo scene the way you do.
After some days trying to implement your example UI demo logic in my project I have dropped it and build my own character controller and GazePointer.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device