Make ArcRotateCamera only rotate when a key is held down

hi, i’ve been trying to figure out how to make the ArcRotateCamera only rotate while the user holds the ctrl/cmd key. I’ve come to a couple of conclusions;

  • attachControl and detachControl whenever the key is pressed - but that will mean you need to press it as well as the ctrl button to pan - it’s not ideal.
  • Somehow customise the camera inputs as detailed here: Customize Camera Inputs - Babylon.js Documentation - but if I’m honest, I’m not really sure what I’m supposed to do - I thought about copying or extending arcRotateCameraPointersInput.js but I don’t understand the code

Any help or pointer in the right direction would be massively appreciated

Cheers!

invoking our input master @PolygonalSun

I think I’ve found a workable solution for this, setting angularSensibilityX/Y to a very high number effectively stops the camera rotating, so I can just control that based on a keypress

Thanks!

1 Like