# Arc Rotate Camera not rotating

**URL:** https://forum.babylonjs.com/t/arc-rotate-camera-not-rotating/3477
**Category:** Questions
**Created:** [May 23, 2019, 2:54pm UTC](https://forum.babylonjs.com/t/arc-rotate-camera-not-rotating/3477 "2019-05-23T14:54:57Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![kengru](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/kengru/32/2504_2.png) [@kengru](https://forum.babylonjs.com/u/kengru)
#### Post date: [May 23, 2019, 2:54pm UTC](https://forum.babylonjs.com/t/arc-rotate-camera-not-rotating/3477/1 "2019-05-23T14:54:57Z")

</div>

I have tried to make the camera auto-rotate but could not seem to get it.  
My code goes like this (I used [Camera Behaviors](https://doc.babylonjs.com/how_to/camera_behaviors) to try to make this happen):

```
let camera = new BABYLON.ArcRotateCamera("Camera", -Math.PI / 5, 1, 4, new BABYLON.Vector3.Zero(), scene);
camera.attachControl(canvas, true);

camera.lowerRadiusLimit = 10;
camera.upperRadiusLimit = 18;
camera.idleRotationSpeed = 2;
camera.idleRotationWaitTime = 1;
camera.idleRotationSpinupTime = 3000;
camera.useAutoRotationBehavior = true;

```

The camera is not moving and I’ve been unable to find the way to make it work, would love some help!

---

<div class="post-metadata">

### Author: ![aWeirdo](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/aweirdo/32/52_2.png) [@aWeirdo](https://forum.babylonjs.com/u/aWeirdo)
#### Post date: [May 23, 2019, 3:17pm UTC](https://forum.babylonjs.com/t/arc-rotate-camera-not-rotating/3477/2 "2019-05-23T15:17:36Z")

</div>

works fine in the PG [Babylon.js Playground](https://playground.babylonjs.com/#RCNHSC)  
can you repro?

---

<div class="post-metadata">

### Author: ![Drigax](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/drigax/32/16585_2.png) [@Drigax](https://forum.babylonjs.com/u/Drigax)
#### Post date: [May 23, 2019, 4:59pm UTC](https://forum.babylonjs.com/t/arc-rotate-camera-not-rotating/3477/3 "2019-05-23T16:59:05Z")

</div>

Welcome to the forum @kengru!

Looks like your code runs as expected in @aWeirdo’s playground, did you setup your scene’s active camera to be the ArcRotate camera you created with the behaviors?

---

<div class="post-metadata">

### Author: ![kengru](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/kengru/32/2504_2.png) [@kengru](https://forum.babylonjs.com/u/kengru)
#### Post date: [May 23, 2019, 6:00pm UTC](https://forum.babylonjs.com/t/arc-rotate-camera-not-rotating/3477/4 "2019-05-23T18:00:51Z")

</div>

@aWeirdo, I see that it’s working on the PG, but for some reason it’s not working on my instance.

@Drigax, yes I did

I inserted my code in the playground and it’s working alright… Seems like I have to do some debugging. Thank you very much for the help.

Quick question, how can I upload a texture to the PG? Can’t seem to find the tool for it, if it exists.

---

<div class="post-metadata">

### Author: ![MarianG](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mariang/32/138_2.png) [@MarianG](https://forum.babylonjs.com/u/MarianG)
#### Post date: [May 23, 2019, 7:00pm UTC](https://forum.babylonjs.com/t/arc-rotate-camera-not-rotating/3477/5 "2019-05-23T19:00:24Z")

</div>

Hi. Do not forget to add render function to your code

```
engine.runRenderLoop(function () {
  scene.render()
})

```

This is what pg has internally 😋

> [@kengru](#):
>
> Quick question, how can I upload a texture to the PG? Can’t seem to find the tool for it, if it exists.

> **[Search Page | Babylon.js Documentation](https://doc.babylonjs.com/search?bjsq=assets)**
>
> Search page for Babylon.js documentation site. Search for documents and code examples
