VisionOS Hover Effect lights up all components when only one is touched

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.

Any ideas why? Or how to fix?

Thanks in advance!

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.

2 Likes

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.

1 Like

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 :smiley:

1 Like

Hi @kapolka

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.


It is unclear to me why it behaves as expected via gaze input, but not touch :confused:

Also, since they are no longer parented, why do they still light up? Does VisionOsHoverEffect fetch children on awake/start, then never updates?

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).

This happens to me too @kapolka @radu_toptal.

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.

Incident: IN-91548

2 Likes

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 :slight_smile: That is exactly what happens, have not tested it with non-prefab objects, maybe that causes it.

1 Like

I’m glad you posted it, as I thought I was doing something wrong :smiley:

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.

1 Like

Noice, that should narrow it a bit down for unity / apple devs.
This does look like a bug to me :slight_smile:
(I hope it gets fixed without me doing too much :P)

1 Like

Thanks for the repro case! I verified that it also happens in a non-Unity visionOS project, and reported the issue to Apple (as FB16253270).

1 Like