# ArcRotateCamera shift Y

**URL:** <https://forum.babylonjs.com/t/arcrotatecamera-shift-y/1059>\
**Category:** Questions\
**Created:** [January 30, 2019, 10:35am UTC](https://forum.babylonjs.com/t/arcrotatecamera-shift-y/1059 "2019-01-30T10:35:19Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![babbleon](https://avatars.discourse-cdn.com/v4/letter/b/ecccb3/32.png) [@babbleon](https://forum.babylonjs.com/u/babbleon)\
**Post date:** [January 30, 2019, 10:35am UTC](https://forum.babylonjs.com/t/arcrotatecamera-shift-y/1059/1 "2019-01-30T10:35:19Z")

</div>

Hello,

Is there a way to emulate the Shift X & Y like we have in Blender on an ArcRotateCamera please?

GIF attached to illustrate what I mean.

 ![a](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/1X/eb797fdb1de8148d3151b9a77f12a562f414c63d.gif)

Thank you.

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [January 30, 2019, 11:22am UTC](https://forum.babylonjs.com/t/arcrotatecamera-shift-y/1059/2 "2019-01-30T11:22:29Z")

</div>

Is It Like panning ? if it is you can do with right click or by pressing the control key ?

---

<div class="post-metadata">

**Author:** ![babbleon](https://avatars.discourse-cdn.com/v4/letter/b/ecccb3/32.png) [@babbleon](https://forum.babylonjs.com/u/babbleon)\
**Post date:** [January 30, 2019, 11:37am UTC](https://forum.babylonjs.com/t/arcrotatecamera-shift-y/1059/3 "2019-01-30T11:37:38Z")

</div>

Hi @sebavan, no it’s not like panning. In BabylonJS terms, it would shift the canvas… something like:

scene.activeCamera.viewport.x = 0.5

…however, if I do the above you only then see half the canvas.

Does this make any sense?

Thank you.

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [January 30, 2019, 11:52am UTC](https://forum.babylonjs.com/t/arcrotatecamera-shift-y/1059/4 "2019-01-30T11:52:20Z")

</div>

How is it different from panning ? Is it not the same effect. Sorry for my lack of understanding.

---

<div class="post-metadata">

**Author:** ![babbleon](https://avatars.discourse-cdn.com/v4/letter/b/ecccb3/32.png) [@babbleon](https://forum.babylonjs.com/u/babbleon)\
**Post date:** [January 30, 2019, 11:58am UTC](https://forum.babylonjs.com/t/arcrotatecamera-shift-y/1059/5 "2019-01-30T11:58:37Z")

</div>

Panning moves the position of the camera. Blender’s ‘shift’ keeps the camera in the same position but moves the view. I fear this doesn’t make much more sense as I can’t find the words to explain!

Some other Blender users on here will hopefully know what I am talking about.

Thank you for your help though, @sebavan.

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [January 30, 2019, 12:00pm UTC](https://forum.babylonjs.com/t/arcrotatecamera-shift-y/1059/6 "2019-01-30T12:00:05Z")

</div>

Ok I understand better now 🙂

We do not have anything like this available. I am wondering about the use case against for instance attaching the camera to a parent node.

---

<div class="post-metadata">

**Author:** ![babbleon](https://avatars.discourse-cdn.com/v4/letter/b/ecccb3/32.png) [@babbleon](https://forum.babylonjs.com/u/babbleon)\
**Post date:** [January 30, 2019, 12:33pm UTC](https://forum.babylonjs.com/t/arcrotatecamera-shift-y/1059/7 "2019-01-30T12:33:45Z")

</div>

Attached is a quick sketch illustrating why this can be useful. It enables a perspective image to have vertical lines. This would only work if you are rotating about the Y axis, though. ![img005](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/1X/c18032d1e348ff4077114561b0f3a407533f1790.jpeg)

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [January 30, 2019, 12:59pm UTC](https://forum.babylonjs.com/t/arcrotatecamera-shift-y/1059/8 "2019-01-30T12:59:03Z")

</div>

I see and I am not sure it should be part of the default camera let see what @Deltakosh thinks.

You could nevertheless define your own camera and replace the projection matrix to fit your needs.

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [January 30, 2019, 4:09pm UTC](https://forum.babylonjs.com/t/arcrotatecamera-shift-y/1059/9 "2019-01-30T16:09:25Z")

</div>

Is that somehow different from a camera.mode = BABYLON.Camera.ORTHOGRAPHIC\_CAMERA ?

---

<div class="post-metadata">

**Author:** ![babbleon](https://avatars.discourse-cdn.com/v4/letter/b/ecccb3/32.png) [@babbleon](https://forum.babylonjs.com/u/babbleon)\
**Post date:** [January 30, 2019, 4:30pm UTC](https://forum.babylonjs.com/t/arcrotatecamera-shift-y/1059/10 "2019-01-30T16:30:20Z")

</div>

Yes, in that its a perspective camera.

Attached are three renders:

- Perspective camera shift  
 ![camshift-01](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/1X/b803a62316f1f07c7b149a5e2444f4ab40daf39b.png)
- Perspective  
 ![camshift-02](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/1X/4cb4acbf9b79ae20216a2a71e7ae16a3d2c4239d.png)
- Orthographic  
 ![camshift-03](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/1X/a69b6d385834846c49e726e52944c25925c06edc.png)

I am using Babyon to render out single images rather than interactive stuff so it may be than very few people would ever make use of it.

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [January 31, 2019, 3:40pm UTC](https://forum.babylonjs.com/t/arcrotatecamera-shift-y/1059/11 "2019-01-31T15:40:56Z")

</div>

So if you want to stay in perspective mode you can probably play with camera.fov to see if that fits your needs?

---

<div class="post-metadata">

**Author:** ![thomasaull](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/thomasaull/32/40115_2.png) [@thomasaull](https://forum.babylonjs.com/u/thomasaull)\
**Post date:** [March 21, 2020, 1:33pm UTC](https://forum.babylonjs.com/t/arcrotatecamera-shift-y/1059/12 "2020-03-21T13:33:29Z")

</div>

@babbleon I think what you want can be achieved with `targetScreenOffset`: [ArcRotateCamera - Babylon.js Documentation](https://doc.babylonjs.com/api/classes/babylon.arcrotatecamera#targetscreenoffset) maybe in combination with `camera.lockedTarget`. I think I did something like this with these two properties. Let me know if you need help!
