Getting exact screen x position on mobile when scaling.

ChristianEs

  • *
  • Posts: 213
i want to create an actor on x0 on the screen, but when i have scale to fit (fill) on android the x 0 position of the screen is not at the edge of the screen but is actually out of the screen bounds more or less depending on the device, how to get the actual device on screen x 0 position using this resize method, i can do it on ios using "if runing on ipad iphone 4, 5, etc", but not on android.

RosalinaGalaxer

  • Posts: 141
Scene> View> [X] of camera

That's the block you'll need.
W̸͚̯̒͗̊̂͗̃ë̴͙̻̣̠͂́͑͘̕̚ỉ̶̱͚̤͕͍̮͛͂̇r̶̲̣̜̳͐̇͋͘d̸͈͎͓̙̔͜ ̵̠̫̜͋̄̔͘͜ǵ̷̯͍̽̍̉͐̽̈́l̶̡̛͎̬̮̮̬̠͌͊̓̇͘i̶̡̻̰̖͕̘̎͊̚t̶̬̬̤̣͌̆͌͐̔̇̀c̷̙̳̙͈̖̀̈̎̋͑̉͜͝h̴̫̀̏͜͝e̷̝͑̊̍͘s̷̥̰̙̠̺̫̆ ̷͈̯̝͘ͅe̸͍̣͇͙͕̖͗̉̓̃̓͌͝v̶͕͕̰̘̙̫͒̑e̷̞̤͍͔͐̽͌̓r̷̨̺̲͊̋͘͝͝y̸̛̱͂̚ẇ̴̨̯̤̠̱̭̣̈̍̓h̶̨̤͎̞͛͋ę̴̻̪̝̙̬̒͜r̵̗̟̼͋ĕ̴̙̬͐͌!̵̱̠̉

“I have never seen a more heated discussion about context, jazz, and cats.” - VanillaButterz

ChristianEs

  • *
  • Posts: 213
I tried it but sadly is the same as creating the actor at x 0 it creates the actor totally outside the screen on android.

ChristianEs

  • *
  • Posts: 213
bump, could be a bug?

colburt187

  • *
  • Posts: 2244
isn't x0 the scene edge, not the screen edge. If you anchor the actor to the screen and set it to x0 is should be at the Screen edge.

ChristianEs

  • *
  • Posts: 213
yep, it is supposed to work like that but it doesn't, my scene is only 320 x 480, and using scale to fit (fill) with 4x graphics makes the scene go out of the (physical device screen) bounds on some devices.
I also anchored the actor and i got the same results going out of the screen.
i think this has to do with how scale modes interpret the stuff.