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

Tags:

Related Article

Posted By

Adam Nagy

Follow @AdamTheNagy Adam Nagy joined Autodesk back in 2005 and has been providing programming support, consulting, training and evangelism to external developers. He started his career in Budapest, then worked in Prague for 3 years and now lives in South England, UK. At the moment focusing on Inventor and Fusion 360, plus cloud and mobile related technologies. Adam has a degree in Software Engineering and has...