Dear BJS-Forum,
we are launching our VR-fair soon and I have a Problem regarding the glitching of a GUI-Mesh. Since this is our first VR-project, maybe someone can have a look and help us? I can’t figure it out and it makes no sense to me whatsoever!
—> Der virtuelle Showroom der Forschungsfabrik Mikroelektronik Deutschland | FM3D (tested/developed on Quest 2)
When someone clicks on one of the exhibits, a mesh is shown with a GUI put ontop of it. This works great.
However, when someone walks into the lift another menu should be triggered on intersect. This works, the menu is triggered, however the menu is only shown, when the user looks downwards. When the user looks straight ahead, the menu disappears/ glitches out of existence…
How can this be? Both menus are constructed the same way:
var faceUV = new Array(6);
for (var i = 0; i < 6; i++) {
faceUV[i] = new BABYLON.Vector4(0, 0, 0, 0);
}
faceUV[1] = new BABYLON.Vector4(0, 0, 1, 1);
this.vr.menu.mesh = BABYLON.MeshBuilder.CreateBox("vr_menu_clicker", {
height:.55,
width: .8,
depth: .0001,
faceUV: faceUV
}, this.scene);
this.vr.menu.mesh.isPickable = true;
this.vr.menu.mesh.isActive = true;
this.vr.menu.tn = new BABYLON.TransformNode("vr_menu_tn");
this.vr.menu.mesh.position.z = -.5;
this.vr.menu.tn.parent = this.camera;
this.vr.menu.mesh.parent = this.vr.menu.tn;
this.vr.menu.mesh.rotation = new BABYLON.Vector3(0,Math.PI,0);
this.vr.menu.mesh.setEnabled(false);
The menu is then shown via:
var na = this.camera.absoluteRotation.clone().toEulerAngles();
this.vr.menu.tn.rotation.y = na.y - Math.PI;
this.vr.menu.mesh.setEnabled(true);
I’m sorry, that I can’t offer a playground
Steps to reproduce:
- Go to Der virtuelle Showroom der Forschungsfabrik Mikroelektronik Deutschland | FM3D
- launch VR-mode
- click on exhibit to see Menu. (Then close it again:)
- walk into the lobby, enter the lift, look down to the ground to see the menu.
Has someone experienced something similar and can maybe point me in the right direction. Can someone with a VR-Goggle who is more competent than me maybe have a look?
The inspector can be triggered by hitting the tab key.
Thanks a lot!