Hi,
scene.isPointerCaptured
always reutrns undefined
when I call it from onPointerMove
, no matter whether I click the screen or not.
Am I missing something?
Hi,
scene.isPointerCaptured
always reutrns undefined
when I call it from onPointerMove
, no matter whether I click the screen or not.
Am I missing something?
As said in the Docs, βscene.isPointerCaptured
gets a boolean indicating if the current pointer event is captured (meaning that the scene has already handled the pointer down)β. This is useful when you want to determine whether user interactions (e.g., clicks, touches) are being handled by Babylon.js or if they should be processed by other parts of your application (e.g., UI elements outside the canvas).
It has the parameter pointerId, so this will work in your PG with click and hold (pointerDown)
scene.isPointerCaptured(1)
Example - https://playground.babylonjs.com/#0IG116#5
(click, hold and move a mouse)
I expected 0 to be equivalent to left mouse button.
In this case it is DeviceType.Mouse
, left click may be derived from event.button
That clears everything. Thanks!