Hi,
there seem to be a weird issue with the pointer ids on the Oculus Quest.
If you are in 2D mode where the controller acts a mouse.
Whenever you press the controller a new pointerId is generated.
That is strange but not critical.
But in VR mode there is a bigger problem.
If you just entered VR. Everthing is fine.
As soon as you you take off the Quest and put it on again it is creating new pointer Ids.
If you then pull the trigger you are receiving an event for the new and an event for the old pointerId.
So if you repeat that process several times you will receive lots of pointer events all with differend pointerIds and targets.
Seems like this bug also has an effect on the angle of the right/left rotation.
I see this issue on the stable 4.0.3 and the latest 4.1.0-alpha.5.
Here is a Playground Links and some logs.
Just let me know if you need some additional information.
https://www.babylonjs-playground.com/#T10KKS#1
Initializing
|Babylon.js v4.1.0-alpha.15 - WebGL2
|[Violation] ‘readystatechange’ handler took 193ms
|babylon.js:16 [Violation] ‘setTimeout’ handler took 64ms
2D Mode. Controller acts as a mouse. Every click generates a new pointerId
|VM220:36 onPointerDown pointerId: 2
|VM220:36 onPointerDown pointerId: 3
|VM220:36 onPointerDown pointerId: 4
Entering VR
|VM220:40 onEnteringVR
|/#T10KKS#1:1 preserveDrawingBuffer was requested for context: it significantly affects rendering performance.
|babylon.js:16 submitFrame must be called within a VRDisplay.requestAnimationFrame callback.
Just entered VR. One click with the trigger creates one event. everything is OK.
|VM220:36 onPointerDown pointerId: 1
Take off the Quest and put it on again. Now a single click produces two events with different pointer ids
|VM220:36 onPointerDown pointerId: 1
|VM220:36 onPointerDown pointerId: 3
Take off the Quest and put it on again. Now a single click produces tree events with different pointer ids
|VM220:36 onPointerDown pointerId: 1
|VM220:36 onPointerDown pointerId: 3
|VM220:36 onPointerDown pointerId: 5