VR - Pointer events for hovering over a mesh

I made a small video of a few interactions in an early VR game called Abode. I’d basically like to get to a point where I can reproduce the interactions of this in BabylonJS.

You’ll see in the video, that the top of the controller model changes when you’re colliding with an interactible item. Now, in BJS I’m using the laser pointer, so the behavior is not exactly the same. I would imagine what would be similar is changing the laser’s color when it’s pointed at a mesh that can be interacted with.

I already set up a way to Grab Objects in an earlier playground, so it’s easy to know if a mesh is interactible because it will have a “startInteraction” function.

What I need is some pointer event for when the pointer ray hits a new mesh, or leaves a mesh, I believe. And as far as I can tell, this doesn’t exist. Is there some other way to do this? onPickMesh is only fired at the same time as onPointerDown. Do I need to cast my own ray every frame to find the same information as what the pointer already knows (since it is drawing a dot on the mesh it collides with).

Babylon’s native intersection events should work the same in XR as they work on desktop.
You can use the on pointer over / out triggers to trigger action (Use Actions - Babylon.js Documentation)