Is there any way to know whether an onPointerObservable is touch input or mouse input?

https://playground.babylonjs.com/#KV9YGK

2 Likes

Hi!
I didn’t try this but should work:

    scene.onPointerObservable.add((ed,es)=>{
        const isTouchDown  = ed.event.pointerType === "touch"
        const isMouseDown  = ed.event.pointerType === "mouse"

3 Likes

It works, thanks!

2 Likes