0 Favourites

Calculate object position by touch event

  • Hi,

    In order to explain the problem please load the file I provided:

    When you run the project in the browser you'll notice that every time you press on the

    "RollDown" object (down arrow image), then the "Focus" object moves down from Cell1 to Cell2 and etc.

    which is ok for running it in the browser.

    The problem occurs when I export to run it on Android, then in my Samsung Galaxy S2 the "Focus" object jumps

    from Cell1 to Cell3 and etc. (2 cells for every touch on the "RollDown" object).

    I tested it also in the IntelXDK emulator and the same problem for every device I tried.

    I've managed to fix the problem by changing the action of the event to: Set Y to Focus.Y + (Focus.Height / 2)

    but then when you run it in the browser the "Focus" object moves down half a cell each time while in my device it moves

    each cell ok.

    I don't understand why I should change the action of this touch event to this: Set Y to Focus.Y + (Focus.Height / 2) while

    this: Set Y to Focus.Y + Focus.Height is the correct one that should be, can someone explain it please ?

    Thanks in advance.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
167 14,490
DMT2005's avatar
DMT2005
Unread hot topic
123 14,869
Zebbi's avatar
Zebbi
Unread hot topic
59 13,713
holi's avatar
holi