Touch Offset with Display Size change, A major issue

thepositivemoxiethepositivemoxie Member Posts: 7
edited June 2012 in Working with GS (Mac)
So I have a game, that needs to be sized for specific Android Tablets, to rid of the black bar. So instead of the initial 1280 x 720, I have it at 1280 x 800. Which looks good on the Transformer, no black bars. My issue is that when I change it, and I have Touch Pressed, Inside, Mouse Down, whatever.... all do the same, that it has to be clicked 80 pixels below. So essentially the images can't be clicked and do its results if its about lets say half way up the actor. Is there maybe a way to if touch, move the touch coordinate up 80 pixels or what not? Or something of that magnitude, that will allow my touch actor to behave correctly?

Best Answer

  • fadamionfadamion Posts: 309
    edited June 2012 Accepted Answer
    I don't think its reading the touch area on the tablet. If I'm correct you can't fix it. move a small actor above the 80 pixels with a touch command "like rotate if touched" on it and see if it works up there.

Answers

  • thepositivemoxiethepositivemoxie Member Posts: 7
    edited June 2012
    Yes, I don't know why I didn't think of that. Seemed to do the trick. So when I spawn an actor initially, now I spawn 2 actors, one the 80 pixel difference from the initial 720 height of the display, above the other actor being spawned, then apply a variable on touch for the 2nd actor that is transparent, calling it true if touched, and say if true on the other ball, then it plays out its rules. Now it hits correctly.

    It didn't seem to be the Touch area on the tablet I found out though, because I did a test on the new scene starting an iPhone project and changed the display size by 80, and it did the same thing in Gamesalad itself. But at last, this has solved it.

    Thank you!
Sign In or Register to comment.