20 Mar 2018

Restrict camera manipulation

Sometimes you may want to restrict the camera movement, so that e.g. the user can only pan in the view direction that you set.

In order to achieve that you just need to lock the camera using

viewer.navigation.setIsLocked(true) 

and enable the "pan" operation using 

viewer.navigation.setLockSettings({"pan":true})

You can find more information about these functions in the online documentation:
https://aps.autodesk.com/en/docs/viewer/v2/reference/javascript/navigation/#setlocksettings-settings 

Tags:

Related Article