Scene setup:
We have a complex piston pump, with ~ 80 models. Each model has a VisionOsHoverEffect component attached to know when you gaze at a component that you are able to move.
Works great, if you only look at them.
All VisionOsHoverEffects LIGHT UP if my hand touches directly any of them!
They are all under a single gameobject, with a rather complex hierarchy, as you are supposed to assembled and disassemble the hydraulic pump.
Changing the hierarchy is out of the question, as components must have subcomponents in every pump.
Unity basically calls this, which affects the descendents too
The HoverEffectComponent applies its effect to an entity’s entire hierarchy, which means that all the entity’s descendent entities inherit the effect when a person looks at (or selects) an entity. HoverEffectComponent | Apple Developer Documentation.
Yes; this came up before in this thread. I mention a couple possible workarounds there, but ultimately this is caused by the behavior of the RealityKit component. You could also use Apple’s Feedback Assistant to suggest that they add a hover mode that is not inherited by descendants.
Thanks a bunch, adding even more colliders will make the piston pump a even bigger mess.
Custom shader might be the way to go if I get the time to learn that
Thought I’d share my findings as I managed to un-parent some game objects with the hope that they won’t light up.
In the screenshots, only one component is highlighted, via gaze input.
The moment I touch it with any finger, all components from the pump light up, despite the disassembled components NOT being under the same parent, but simply in hierarchy with no parent.
VisionOS Hover Effect doesn’t fetch the children at all; it just causes the creation of a HoverEffectComponent. It’s possible that Apple’s HoverEffectComponent only fetches the children once (when created), but I would be surprised if that were the case (and if it were true, then it would show the same behavior for gaze and touch).
I’m not sure what the issue is, but if you can create a repro case and submit it as a bug report (and let us know the incident number: IN-#####), we can look into it. At the very least, we may be able to reproduce the issue in a non-Unity project in order to report it to Apple (assuming the issue is on their end).
I noticed this the other day, but it wasn’t blocking me. I’ve made a repro for you to have a look at, it’s pretty simple - uses your mixed reality scene, and instantiates a bunch of prefabs in front of you, which have the VisionOSHoverEffect on them. Correct behaviour with gaze, but put your finger near one, and all of them will highlight.
I’m radu_toptal (don’t ask why I’m on a different account xD)
Thank you so much for making that incident ticket, saved me quite some time That is exactly what happens, have not tested it with non-prefab objects, maybe that causes it.
I’m glad you posted it, as I thought I was doing something wrong
I wondered if it might be any objects that share the same mesh - or all prefabs? But just tried expanding my repro, and it just looks like everything that has a VisionOSHoverEffect component on it in the whole scene gets activated if you touch it. Tried with and without prefabs.