Ignore mouse movement when interacting

I’m using a FreeCamera and onPointerObservable/POINTERDOWN events. Is there a way when I sucessfully pick a mesh with the mouse I want to interact with, to stop the freecamera from moving around for the duration of the click?

Yes, camera.detachControl()

See Babylon.js Playground

Oh that’s lovely. If I have redundant camera.attachControl(canvas, true) functions, it won’t have any negative effects, right? Or is there a way to check whether control has been detached before attaching again?

This may help.

1 Like