How to make A kind of rectillium/selector in babylon

i want to select object like in this script do we have some library or some other thing similar to this , i donot know exact wording for this so giving example , i want to implement it in both normal mode and vr mode. Kindly help .

Hi Amit/others. Has this issue been solved, yet?

“selecting a mesh” is sometimes called “mesh picking”. Many people use ActionManager (added to the mesh)… to do powerful “picking” operations that work correctly in standard or VR mode.

There is also options for placing an invisible BJS GUI button/panel-of-buttons “atop” the mesh… which always faces the camera, and can “simulate” a mesh being “picked”. Using 4 GUI invisible buttons… inside a GUI stack-panel, (all invisible)… you can create “zones” on the panel. In brief… click on UPPER part of mesh, mesh rotates upward. Click on LEFT part, mesh rotates left, etc. etc. 4 button-“zones” on a panel, all can be invisible, or partially-transparent, or opaque.

SOME people make a GUI stack-panel-of-button-choices that pops-up when a mesh is “selected”, which disappears when no mesh is selected (edit mode/normal mode).

Ok, that’s some ideas. Keep experimenting, and please give report of current progress. Is this issue still “open”? If so, we try to help more.

1 Like

hi there , i am asking that feature in webVr , which is really a mess when we have button in tabular form. :frowning: my project is suffering badly due to features missing.

  1. not able to proper select objects when in webvr.
  2. i am not able to word wrap / use html written
    in some place i have to use “html2canvas” . and many more .
    I really appreciated help form this forum. but the library need to have some basic features more to make it user friendly.

I think the VRHelper can definitely helps :slight_smile:
We do have a gaze selector for instance.

You should find this article helpful: From zero to hero, creating WebVR experiences with Babylon.js on all platforms – David Rousset


  1. Object selection in VR can be used using the controllers or the gaze selector, as Deltakosh said. What it means - to “select” an object is left entirely to you - you can tell when an object was picked, but you are in charge of doing something with this info.
  2. Chrome would not allow me to go to the demo (claiming a phishing scam) - it would be great if you can use a different link, but I have a general answer - VR does not allow HTML in the layer that is presented in the HUD. meaning - you can only broadcast a canvas (a SINGLE canvas). This is the VR specifications. XR is a bit different, but all in all, at least at the beginning, it is going to work the same.