Forum Discussion
hellmanagency
8 years agoHonored Guest
Problem labeling buttons on Oculus Rift Avatar in Unity 3D
I am using the Oculus Avatar SDK to display both hands and controllers in my scene. I wanted to add text to the controllers to label the button functions. I had no trouble getting the labels to apply and to follow the controller. However, whenever my text passes in front of the controller mesh, it is obscured by the controller (even though it is in front of it). The hand portion of the avatar doesn't have this problem; only the controllers. Anyone have any idea what might be going on and how I could fix it?
4 Replies
Replies have been turned off for this discussion
- MikeFTrusteeThis sounds like a z depth sorting issue, try increasing the render queue on the material/shader you're using for the labels
- hellmanagencyHonored Guest@MikeF I tried doing that and it didn't have any effect. I'm not 100% sure what those values actually mean, but I tried setting that at the lowest and highest values and it didn't effect it at all.
- hellmanagencyHonored Guest
imperativity said:
Hi,
Welcome to the Oculus Developer Forums.
I have two questions for you:
1) What version of Unity and Avatar SDK are you using?
2) Are you using OVROverlay by any chance?
From the documentation on OVROverlay:Basic usage
- Attach OVROverlay.cs to a Game Object.
- Specify the Current Overlay Shape:
- Quad (Rift and Mobile)
- Cubemap (Rift and Mobile)
- Cylinder (Mobile only)
- Specify the OVROverlay Texture. If you leave it as None
(default), it will use the Renderer material’s main texture, if
available. See OVRRTOverlayConnector below for more information on
rendering textures to an OVROverlay Game Object. - Disable all compositor layers (both overlays and underlays),
- Enable
them sequentially to set the order in which you wish them to appear,
enabling overlays in front last and underlays in front first.
Hmm..... that didn't seem to work. This is a really weird problem. I'm using Unity 2017.1.0f3 (64-bit) and Avatar SDK 1.10.1.
Let me show you some images of what is happening:
#1. Here is the text obscured by the controller.
#2. If I rotate my hand around, you can see that the text is properly positioned in front of the controller.
#3. To make things even more bizarre, if I pass the controller in front of certain objects in the scene, the text magically appears but only where that object is. - hellmanagencyHonored GuestThat didn't seem to work. I'm using Unity 2017.1.0f3 (64-bit) and Avatar SDK 1.10.1.
Here is some more detail about what is happening:
#1. Here is the text obscured by the controller.
#2. This screenshot shows that the text is aligned properly (ie. not behind the controller in 3D space).
#3. Here's where it gets really weird. When the controller passes in front of some objects in the scene, the text become visible.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 2 years ago
- 1 year ago
- 9 months ago