Calculate object position by touch event

0 favourites
  • 1 posts
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • 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.

  • Try Construct 3

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

    Try 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)