Calculate object position by touch event

Get help using Construct 2

Post » Tue Nov 04, 2014 11:55 pm


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.
You do not have the required permissions to view the files attached to this post.
Posts: 22
Reputation: 417

Return to How do I....?

Who is online

Users browsing this forum: Canofsuup, Google [Bot], satrio05, thewisetree and 10 guests