# How do I move the center of the camera to the side of the screen instead of the center

**URL:** <https://community.cesium.com/t/how-do-i-move-the-center-of-the-camera-to-the-side-of-the-screen-instead-of-the-center/7530>\
**Category:** CesiumJS\
**Created:** [October 8, 2018, 6:54am UTC](https://community.cesium.com/t/how-do-i-move-the-center-of-the-camera-to-the-side-of-the-screen-instead-of-the-center/7530 "2018-10-08T06:54:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shilodrot](https://avatars.discourse-cdn.com/v4/letter/s/e19b73/32.png) [@shilodrot](https://community.cesium.com/u/shilodrot)\
**Post date:** [October 8, 2018, 6:54am UTC](https://community.cesium.com/t/how-do-i-move-the-center-of-the-camera-to-the-side-of-the-screen-instead-of-the-center/7530/1 "2018-10-08T06:54:23Z")

</div>

Part of my map is hiding under another HTML element, and sometimes above it.  
I want to change the center of the view when I use flyTo according to the new center of the map.

What is the best way to do this?

---

<div class="post-metadata">

**Author:** ![omar](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/omar/32/1999_2.png) [@omar](https://community.cesium.com/u/omar)\
**Post date:** [October 9, 2018, 3:18pm UTC](https://community.cesium.com/t/how-do-i-move-the-center-of-the-camera-to-the-side-of-the-screen-instead-of-the-center/7530/2 "2018-10-09T15:18:25Z")

</div>

I think it depends on how you’re using flyTo. If you’re just passing in a destination as a Cartesian3, you can just apply an offset to that before you pass it in. You may also find these functions helpful in translating back and forth between world and screen coordinates:

[https://cesiumjs.org/Cesium/Build/Documentation/Scene.html?classFilter=Scene#cartesianToCanvasCoordinates](https://cesiumjs.org/Cesium/Build/Documentation/Scene.html?classFilter=Scene#cartesianToCanvasCoordinates)

[https://cesiumjs.org/Cesium/Build/Documentation/SceneTransforms.html?classFilter=transforms#.wgs84ToWindowCoordinates](https://cesiumjs.org/Cesium/Build/Documentation/SceneTransforms.html?classFilter=transforms#.wgs84ToWindowCoordinates)
