How do I track X/Y in Window vs. Layout (solved)

0 favourites
  • 4 posts
From the Asset Store
Weather Wind Sounds - Mountains contains 10 tracks (3 tracks and 7 seamless loops)
  • Hi there,

    So I have a situation where I'm trying to make it where I can track where I am in the Window to control visual display. However at any time in the game my layouts might be much bigger than the window... so if i have a window that's say.. 1136x640.. but my layout is 3000x3000.. the problem i face is that i only seem to be able to get the layout x and y of my Touch position..

    http://part12studios.com/temp/Games/Fin ... gerKing01/

    notice how if i move over to the right of the screen.. the arm adjusts its position.. but this is currently based on the X of the layout.. which would be fine if my Window was also the same size but the logic breaks down when layouts become bigger than the window.

    Thanks!

    Caleb

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I don't really see the problem, but you can get the X/Y based on the layer for Touch. Also there are System CanvasToLayer and LayerToCanvas expressions for converting coordinates between layers.

  • blackhornet ok i see those. i'll mess around with it.. yea the visual isn't terribly off but the issue was irking me because of this kind of situation:

    take the player finger quickly over to the far right of the screen.. then quickly shoot to the left and the issue is that the arm is still pointing upward which would be unnatural for the player relative to the position of the body shadow. I'll research those and see if those do the trick and report back!

    Thanks,

    Caleb

  • ah ok yes now i get it.. yes the touch.x did the trick.. don't know why i didn't think of that.. ugh.. thanks!

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