# Move camera forward programatically in 2D

**URL:** <https://community.cesium.com/t/move-camera-forward-programatically-in-2d/3089>\
**Category:** CesiumJS\
**Created:** [September 20, 2015, 8:32pm UTC](https://community.cesium.com/t/move-camera-forward-programatically-in-2d/3089 "2015-09-20T20:32:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alvaro.r.villalba](https://avatars.discourse-cdn.com/v4/letter/a/46a35a/32.png) [@alvaro.r.villalba](https://community.cesium.com/u/alvaro.r.villalba)\
**Post date:** [September 20, 2015, 8:32pm UTC](https://community.cesium.com/t/move-camera-forward-programatically-in-2d/3089/1 "2015-09-20T20:32:03Z")

</div>

Hi!

I'm trying to use the camera.moveForward method to zoom the map with enabledZoom set to false. It works perfectly in 3d, even though, when the map is set to 2D mode, it simply stops moving the camera after calling the method. You can check this behaviour in the camera tutorial in sandcastle [http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Camera%20Tutorial.html&label=Showcases](http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Camera%20Tutorial.html&label=Showcases) , just change the map type to 2D and the w and s for zoom will simply stop working. Does anyone know if this is a bug or if i'm supposed to use a different method for zooming in 2d?

Greetings

---

<div class="post-metadata">

**Author:** ![Dan\_Bagnell](https://avatars.discourse-cdn.com/v4/letter/d/ba9def/32.png) [@Dan\_Bagnell](https://community.cesium.com/u/Dan_Bagnell)\
**Post date:** [September 21, 2015, 4:39pm UTC](https://community.cesium.com/t/move-camera-forward-programatically-in-2d/3089/2 "2015-09-21T16:39:14Z")

</div>

The moveForward method moves the camera’s position along the view direction. It will still move it in 2D, but it will not appear to because of the orthographic projection. To zoom in 2D, you need to change the projection. Use the zoomIn and zoomOut functions. It will use moveForward or modify the projection based on the scene mode.

---

<div class="post-metadata">

**Author:** ![alvaro.r.villalba](https://avatars.discourse-cdn.com/v4/letter/a/46a35a/32.png) [@alvaro.r.villalba](https://community.cesium.com/u/alvaro.r.villalba)\
**Post date:** [September 22, 2015, 3:02pm UTC](https://community.cesium.com/t/move-camera-forward-programatically-in-2d/3089/3 "2015-09-22T15:02:32Z")

</div>

That worked perfectly, thank you very much!
