Hello,
I’d like to add a Reticle to the end of the straighter-line raycast that shows when you point at UI elements. This is for the “Near-Far Interactor”.
Not on the “Teleport Interactor”.
The desired appearance is shown in the video example attached showing Meta’s Reticles on the menus.
Also, ironically, the desired reticle appearance is shown in the video screen example that plays inside of the VR template (the template that you can choose when starting a new VR Unity project) showing Unity’s recording of Reticles on their menus.
Though it isn’t working (yet) in the actual build of my VR template example.
For that recorded example, I was using Unity’s “VR Template” / scene (again the one you can choose when starting a new VR project) – which uses the “XR Interaction Toolkit”.
Am using this template mainly to show the cleanest example.
And using Unity 6000.0.31f1.
This desired appearance of the Reticle on the UI objects can’t be replicated in any Builds of this example project – it will not hover above any UI buttons, etc. – Instead it goes behind any UI buttons, etc., as shown.
For this Reticle, am using an “XR Interactor Reticle Visual” component (part of the “XR Interaction toolkit”).
I placed the “Reticle Visual” component on the “Near-Far Interactor” Object in the Rig.
Then, I created a 3D Sphere Object. I removed the “SphereCollider”, and I reduced the sphere’s scale to 0.03 in all dimensions.
Then made it a Prefab as it needs to be one for the component to use it as a reticle.
I also adjusted the settings in the “Reticle Visual” component.
With my understanding; It’s that a “Layer Mask” acts as an inclusion list – not an exclusion list – so my First test build had the “Raycast Mask” in the “Reticle Visual” component set to the “UI” layer.
With this setting, the Reticle appears on everything else but the “UI” for some reason — It shows on all the walls, other Interactable objects, etc.
Just to test / check other variations, I next set the “Raycast Mask” to “Everything” – as shown:
And again in the next build the Reticle appears on everything else but the “UI” — It shows on all the walls, other Interactable objects, etc. (as seen in the 3rd video)
The reticle shows up (as seen in the 3rd video) and can interact with buttons – Though my whole reason for wanting a reticle is so it can point on top to the UI items like the Buttons in UI menus, for a more intuitive user experience.
The Reticle’s desired appearance to show on top of the UI objects didn’t work in any Builds of this example project.
Am not understanding why this is happening.
Question: How to get the reticle to show ON the UI objects – mainly the buttons?
Please share any of your advice.
Thank you for your assistance!
