Finding which gameObject is selected (being viewed) by user


Are there any way we can find which gameObject is selected (being viewed) by a user?

We know how to do PolySpatial Hover Effect with corresponding script and how to enquiry the gameObject when user pinch, but we are a way to find the gameObject whenever a user is looking at it (and highlighted) before pinching. Thanks.

As the devs have said, gaze info is not available “for privacy reasons”. When we needed to do more than just the basic “hover effect”, we switched from gaze pointing to “head pointing”: highlighting the object in the center of the “screen” regardless of where the player’s eyes were pointing, like we’ve been using for years on VR/AR games without gaze tracking.

this method honestly has a lot of advantages over gaze tracking. e.g. you can pop up an info box over the object being highlighted, and the player can look up with their eyes and read the info box without losing the highlight.

1 Like

Thanks @Hunter_Work, we are also using the head pointing way to control a reticle for part of our design, However, we are using the PolySpatial Hover Effect in combination of UnityEngine.InputSystem.EnhancedTouch to implement a look-and-pinch gesture for dragging objects. This is when we would like to change state of a gameObject when user look at it.

1 Like