MarianG Posted October 21, 2017 Share Posted October 21, 2017 Hi.I have a little problem with the VRDeviceOrientationArcRotateCamera and GUI. Here is the situation: http://www.babylonjs-playground.com/#X1WNDK#3. Please click the check button to change camera. Now comes the problems 1. Gui seems to respond only on left camera, and I don't know why, but here seems to be the checkbox button. Please let me know why this is happening. Thank you. Quote Link to comment Share on other sites More sharing options...
brianzinn Posted October 22, 2017 Share Posted October 22, 2017 I think only one camera is used for pointer events.https://doc.babylonjs.com/classes/3.0/scene#cameratouseforpointers-camera-classes-3-0-camera- This switches it so that only the right camera is working. I don't think pointer events are really a VR thing.... check out davrous demo with gaze and VR Helper.http://www.babylonjs-playground.com/#X1WNDK#4 Quote Link to comment Share on other sites More sharing options...
RaananW Posted October 23, 2017 Share Posted October 23, 2017 The problem here is that the event listener of the GUI is not being resized (and multiplied) across both cameras. It is (probably) using the parent camera to position the elements and set the pointer listeners. While this is a bug (technically it should not happen), @brianzinn is totally right - you cannot use pointer events with VR devices. This "thumb" pressing from the cardboard is the least practical way to interact with the scene. And again, as already said, check gaze - which is the standard way to go. Quote Link to comment Share on other sites More sharing options...
MarianG Posted October 23, 2017 Author Share Posted October 23, 2017 Ok, thank you both. I understand where I'm wrong. I want only a toggle button to switch to vr and back on a 360 photo viewer, not extremely complex VR interaction. Quote Link to comment Share on other sites More sharing options...
RaananW Posted October 23, 2017 Share Posted October 23, 2017 Totally understandable. We should probably dive into the GUI error, but I am not sure how many people really need a click in VR Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.