Prevent user controlling the model on embed

viewer

(Arck Project) #1

Hey there,

How can I prevent a user from manipulating an embedded model, while still controlling the model through other event listeners?

Specifically I want to have a model rotate on webpage scroll, but don’t want the user to be able to pan/rotate/zoom. Is this currently possible?

Thanks!


#2

You could do something like this, but maybe restrict model rotation completely and use the rotate()function to move the model instead of the camera.

https://labs.sketchfab.com/experiments/article-scroll/


(Tiagojdferreira) #3

Hi @arck_project!

I believe the options you are looking for are:

  • scrollwheel
  • orbit_constraint_pan
  • orbit_constraint_pitch_down
  • orbit_constraint_pitch_up
  • orbit_constraint_yaw_left
  • orbit_constraint_yaw_right
  • orbit_constraint_zoom_in
  • orbit_constraint_zoom_out

You can check their documentation here:

Hope this helps, and feel free to ask any follow up questions.