Guys,
I am thinking about turning camera modes on/off. With options as rotation, zoom or pan. As far as I found, I would need to implement my own input behavious, but is there a chance to just toggle properties on the camera, like enablePan etc?
Guys,
I am thinking about turning camera modes on/off. With options as rotation, zoom or pan. As far as I found, I would need to implement my own input behavious, but is there a chance to just toggle properties on the camera, like enablePan etc?
This can be done now by enabling or disabling camera inputs. Instead of turning camera behaviors on and off, simply enable or disable the controls. Here is the documentation:
https://doc.babylonjs.com/how_to/customizing_camera_inputs
Galen
Yep, saw this, but what if Im interrested only in removing the right click functionality of a mouse?
You might look into “complex” mouse events instead of “simple” mouse events. Here’s the docs:
https://javascript.info/mouse-events-basics
The actual line of code might read:
document.oncontextmenu = document.body.oncontextmenu = function() {return false;}
oncontextmenu is a right mouse click which can easily be enabled or disabled.
Galen