March 20, 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://developer.autodesk.com/en/docs/viewer/v2/reference/javascript/navigation/

Related Posts