3D elements in a scene change their height when you change the resolution of the project

0 favourites
  • 9 posts
From the Asset Store
With this template you can create your own archer game and customize it however you want.
  • 1920x1080


    240 x 135



  • I'm not sure about the reasons behind the situation, but in r265, you can retrieve a property called ZScale from a 3DCamera object which to my understanding will give you the "ratio" between one "Z height unit" and a "width/height pixel".

    I've only started testing the stuff, but it seems that if you want perfect cubes (at all resolutions), you need to make 3DShape objects with equal width and height and set their height at runtime to "3DShape.Width / 3DCamera.ZScale".

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • This is currently by design as the Z scale is calculated such that when the camera is at Z=100, the layout displays with 100% scale. The new Z scale property of 3D camera gives you the number of pixels per unit on the Z axis so you can compensate for this.

  • Ashley

    Is there a way to use the Z Scale property with mesh distorted Sprites, besides re-distorting their individual points at res change? In my particular case, re-distorting causes a noticeable delay due to the number of unique distortions and Sprites that I'm using.

    3D Shapes have the Z Height parameter - Sprites do not.

    If not, would it be possible to either have a per-Sprite Z-Scale parameter to scale the whole Sprite in Z by a user defined amount, or alternatively, scale the Sprites automatically as the global Z Scale changes?

  • I'm not clear why you need to do that. Why aren't you using a fixed resolution? With the default letterbox scale everything should just work.

  • I know about letterboxing, but ideally I need my project to work on devices with a variety of aspect ratios and resolutions - due to the style, it should run in device native res without any black bars, filling up the whole screen.

    Currently, I have a starting event group that checks for resolution and distorts every sprite according to that - it is not efficient nor elegant and that group will continue to grow as the number of unique distortions increases, but it works...

    However, I believe that now, with a fully controllable 3d camera, distorting some scene elements non-uniformly, based on resolution, is not really the proper behavior.

  • I also use automatic screen adjustment for all resolutions. I just change the canvas size to fit the device screen size in Letterbox Scale mode. And it always works perfectly. But now everything is changing, even the speed of movement



  • Ashley Could you help me and write down what needs to be done so that in the mobile vertical version, the camera and the objects of the game maintain their correct position and proportions? I don't use 3d shape, I use sprites.

    The 3d camera's ZScale shows a minimum value of 5.79. Substituting it in different ways, I did not succeed. For a better understanding of what is happening, you need to look at the gif in the post above

  • I would advise to just use the default letterbox scaling for the time being.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)