How do I get same position values with different screen sizes?

0 favourites
  • 4 posts
From the Asset Store
Adjusting the game screen for different resolutions (Letterbox scale)
  • Hello,

    I want to get same position values with different screen sizes. I am using Touch.AbsoluteX and Y but when I change browser window sizes, values are getting different but sprite is in same background point.

  • Hello,

    I want to get same position values with different screen sizes. I am using Touch.AbsoluteX and Y but when I change browser window sizes, values are getting different but sprite is in same background point.

    You should get the same values on any screen size if you use the normal:

    Touch.x

    Touch.Y

    The Screen size It shouldn't affect the values unless you scale (Layout/Layers)

  • > Hello,

    >

    > I want to get same position values with different screen sizes. I am using Touch.AbsoluteX and Y but when I change browser window sizes, values are getting different but sprite is in same background point.

    You should get the same values on any screen size if you use the normal:

    Touch.x

    Touch.Y

    The Screen size It shouldn't affect the values unless you scale (Layout/Layers)

    Thanks for reply. You are right! Dou you know what is the difference between AbsoluteXY and XY?

    My problem was full screen mode. It was Scale Outer. Letterbox scale solved the problem.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sorry for the late reply they just showed me the notification.

    Hi Tom

    There is something wrong with the forum, some times takes many days to show the notification and the post itself is invisible until you receive the notification, it happen on the other post the same, after 2 days they showed me the notification and the posts were never visible until after the notification so users can be waiting for days for an answer because of that as if you visit the thread their post is hidden. Not sure if its only happens to me or is to everyone.

    I'm just letting you know )

    ===============================================================================

    Thanks for reply. You are right! Dou you know what is the difference between AbsoluteXY and XY?

    Here is the official explanation from the manual they will explain it better than I.

    https://www.construct.net/en/make-games/manuals/construct-3/plugin-reference/mouse

    To be honest I never needed to use

    AbsoluteX

    AbsoluteY

    If the (Layout/Layer) is not scaled then I use the normal:

    Touch.X

    Touch.Y

    If an object is in a Scaled layer then I use

    or

    Canvas To Layer (Layer To Canvas)

    ===================================================

    My problem was full screen mode. It was Scale Outer. Letterbox scale solved the problem.

    Scale Outer can show parts from outside of the viewport to cover the full screen while the letterbox just adds the black bars to cover it.

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