# Vertical camera rotation

**URL:** <https://discourse.threejs.org/t/vertical-camera-rotation/15334>\
**Category:** Questions\
**Tags:** rotation, camera\
**Created:** [May 18, 2020, 11:57pm UTC](https://discourse.threejs.org/t/vertical-camera-rotation/15334 "2020-05-18T23:57:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dullbananas](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/dullbananas/32/10850_2.png) [@dullbananas](https://discourse.threejs.org/u/dullbananas)\
**Post date:** [May 18, 2020, 11:57pm UTC](https://discourse.threejs.org/t/vertical-camera-rotation/15334/1 "2020-05-18T23:57:46Z")

</div>

I can rotate the camera horizontally with this:

```auto
camera.rotateY(amount);

```

How do I do the same thing but vertically?

---

<div class="post-metadata">

**Author:** ![mjurczyk](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mjurczyk/32/10995_2.png) [@mjurczyk](https://discourse.threejs.org/u/mjurczyk)\
**Post date:** [May 19, 2020, 7:44am UTC](https://discourse.threejs.org/t/vertical-camera-rotation/15334/2 "2020-05-19T07:44:55Z")

</div>

You can use [https://threejs.org/docs/index.html#api/en/core/Object3D.rotateOnWorldAxis](https://threejs.org/docs/index.html#api/en/core/Object3D.rotateOnWorldAxis) :

- Horizontal: `camera.rotateOnWorldAxis(new Three.Vector(0.0, 1.0, 0.0), angle)`
- Vertical: `camera.rotateOnWorldAxis(new Three.Vector(1.0, 0.0, 0.0), angle)`

This will properly rotate camera even if it’s tilted at some awkward angle.  
If you need to rotate camera horizontally / vertically along it’s local axes, it’s probably enough to use `rotateY / rotateX`.
