Hi,
I have added spherical panning from the docs to photodome. It works fine. But if i switch to VR mode, change texture on gaze select and exit VR, the panning does not work the right way again. Here’s the PG,
https://www.babylonjs-playground.com/#542YVK#8
Please help. Thank you.
Also, while using useDirectMapping: false, the photodome show the stitching line. But the same works fine when set to true. But for FOV adjustments thats needed. How to get rid of the seam?
Looking quickly at your code (sorry, I’m mobile at the moment), it seems like you use scene.pointerX/Y heavily. Those values don’t exist in VR, simply because we track the pointer differently (there is no pointing device like a mouse on the canvas itself, it’s all in the scene).
As I haven’t tested the scene in a real device I can’t really say, but I see the references in almost each pointer event, so I guess it is related. You will need to adjust your code to a more abstract way of handling user input.
Thanks for your time, looking into this… The spherical panning is needed in normal browser and not in VR. The WebXR free camera is enough in VR mode. The problem is,
- Load playground in mobile – panning works in normal mode
- Enter VR, then Exit VR – after exiting panning works in normal mode
- Enter VR, Change texture using gaze, Exit VR – panning not working in normal mode as expected!!
Also, can you please explain on adjusting the code to an abstract way. Does it mean making abstraction of user input for all modes like touch, gaze, controllers etc.? Any samples would be highly helpful.
Fought a lot with “addSphericalPanningCameraToScene” function. But still failed and panning did not work properly after exiting VR.
And at last, got the requirement of panning work after exiting VR, using ArcRotateCamera with
camera.angularSensibilityX = -2500;
camera.angularSensibilityY = -2500;