# Make scene force landscape mode, Click position error

**URL:** <https://forum.babylonjs.com/t/make-scene-force-landscape-mode-click-position-error/31956>\
**Category:** Questions\
**Created:** [July 6, 2022, 9:29am UTC](https://forum.babylonjs.com/t/make-scene-force-landscape-mode-click-position-error/31956 "2022-07-06T09:29:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zz\_dz](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/zz_dz/32/24906_2.png) [@zz\_dz](https://forum.babylonjs.com/u/zz_dz)\
**Post date:** [July 6, 2022, 9:29am UTC](https://forum.babylonjs.com/t/make-scene-force-landscape-mode-click-position-error/31956/1 "2022-07-06T09:29:39Z")

</div>

I use CSS to force the landscape model, but I found that there is a problem with the direction of drag？

```auto
    html,
      body {
        overflow: hidden;
        width: 500px;
        height: 800px;
        margin: 0;
        padding: 0;
      }
      #renderCanvas {
    
        position: fixed;
        width: 800px;
        height: 500px;
        top: 0;
        left: 0;
        -webkit-transform-origin: left top;
        -ms-transform-origin: left top;
        transform-origin: left top;
        transform: rotate(90deg) translateY(-100%);
      }

```

this is a demo

[http://www.3dyzt.com/temp/index.html](http://www.3dyzt.com/temp/index.html)

---

<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:** [July 6, 2022, 12:43pm UTC](https://forum.babylonjs.com/t/make-scene-force-landscape-mode-click-position-error/31956/2 "2022-07-06T12:43:59Z")

</div>

If I understood well,  
they are related

> [@Pointer click detection is wrong after rotating the HTML (via CSS). Click on GUI elements not detected](https://forum.babylonjs.com/t/pointer-click-detection-is-wrong-after-rotating-the-html-via-css-click-on-gui-elements-not-detected/27549/7):
>
> Hi. Well basically the goal is to have like “forced landscape mode”. As I understand, browsers are not allowing to force landscape orientation without user interaction (but I’ve been told that some engines, like Cocos, have ability to do this, but I don’t know how). So the idea was to detect portrait mode and via CSS to rotate the whole page to imitate landscape orientation. Rotating just the GUI will not work for me, I suppose. Is there a way to somehow force engine to render everything rotate…

> [@If rotate div, the button will can not be click](https://forum.babylonjs.com/t/if-rotate-div-the-button-will-can-not-be-click/30853/5):
>
> We have no plans of supporting it AFAIK. This will require a few changes in the way we are parsing X and Y positions of the pointer and the pointer deltas between frames. Maybe @PolygonalSun has a different answer?

Short answer, not supported yet unfortunately

---

<div class="post-metadata">

**Author:** ![zz\_dz](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/zz_dz/32/24906_2.png) [@zz\_dz](https://forum.babylonjs.com/u/zz_dz)\
**Post date:** [July 7, 2022, 12:53am UTC](https://forum.babylonjs.com/t/make-scene-force-landscape-mode-click-position-error/31956/3 "2022-07-07T00:53:52Z")

</div>

thanks,I fand a easy way to solution,it is use iframe
