What is mesh.isNearGrabbable?

I noticed that AbstractMesh has boolean property isNearGrabbable. I can’t find much information about what it’s used for. Can I use this in immersive vr somehow?

Yeah it’s used in VR, especifically in this class WebXRNearInteraction | Babylon.js Documentation (babylonjs.com) :slight_smile:

1 Like

Ok… but… What does it do? How does one use it? What is meant by “interaction”? Does it mean pick up a near by mesh and throw it with my controller hand? Or pull a level? Or push a button with a virtual finger by it?

@RaananW will be the best person to answer this once he’s back from vacation :smiling_face:

It is a flag that allows support for near interactions, mainly in XR.
It is used for 3D GUI (like the MRTK 2.0 support we have - MRTK 2.X For Babylon.js | Babylon.js Documentation), but if you use the near interaction module (WebXRNearInteraction | Babylon.js Documentation) you can use it on other nodes as well. The main thing is - when are events triggered. If this flag is enabled and you “grab” a grabbable node, a pointer down will be triggered

1 Like