# Rotate camera in 360 degree

**URL:** <https://forum.babylonjs.com/t/rotate-camera-in-360-degree/17152>\
**Category:** Questions\
**Created:** [January 4, 2021, 5:13pm UTC](https://forum.babylonjs.com/t/rotate-camera-in-360-degree/17152 "2021-01-04T17:13:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![saifshk17](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/saifshk17/32/1418_2.png) [@saifshk17](https://forum.babylonjs.com/u/saifshk17)\
**Post date:** [January 4, 2021, 5:13pm UTC](https://forum.babylonjs.com/t/rotate-camera-in-360-degree/17152/1 "2021-01-04T17:13:20Z")

</div>

I am rotating my camera in 360 degrees with scene.beforeRender() function. The rotation works as expected. I want the rotation to be stopped if there is a mouse click button triggered. How do I achieve this? Also the rotation should play again after 10 seconds of inactive mouse click.

> **[Babylon.js Playground](https://playground.babylonjs.com/#WP9WDU%2325)**

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [January 4, 2021, 6:45pm UTC](https://forum.babylonjs.com/t/rotate-camera-in-360-degree/17152/2 "2021-01-04T18:45:43Z")

</div>

You can use pointer interaction to stop rotating after a mouse click:

> **[Interacting With Scenes | Babylon.js Documentation](https://doc.babylonjs.com/divingDeeper/scene/interactWithScenes#pointer-interactions)**
>
> Begin learning about how to develop interactions for your Babylon.js scenes.

Use a window.setTimeout timer to restart after 10s (cancel / recreate the timer if you detect a mouse click before the 10s delay).

---

<div class="post-metadata">

**Author:** ![albaaaaagc5](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/albaaaaagc5/32/20203_2.png) [@albaaaaagc5](https://forum.babylonjs.com/u/albaaaaagc5)\
**Post date:** [October 3, 2022, 11:29am UTC](https://forum.babylonjs.com/t/rotate-camera-in-360-degree/17152/4 "2022-10-03T11:29:26Z")

</div>

How did you implement the action to stop the animation of the image with the mouse? thanks
