Stop camera360 rotation with a mouse click and then rotate it again

Hello, I need to include in the following function of the camera rotation something that makes the rotation stop when I click on it and after 15 seconds the rotation continues again.

I leave here the playground

Thanks

Simplest way I come up is to use rotationSpeed. On click I would set it to 0 and setTimeout for 15 seconds to set rotationSpeed to original value.

The playground:

Note: Maybe you prefer different PointerEventTypes like POINTERDOWN or POINTERUP instead of POINTERPICK.

Another way would be to use Observable for rotation, which you remove on pointer click and add again after 15 seconds timeout.

Playground using Observable:

1 Like

Yup. Why make it complex when it can be ez? :smiley: :smile:
BTW, it also can be ez just using the autorotate camera. Something like this:

So, there’s always more than just one way to make things ez with BJS. Reason why I luv this framework so much :smiley:
Meanwhile, have a great day :sunglasses: