Analog Touch Control - Help

Get help using Construct 2

Post » Fri Aug 31, 2012 5:28 pm

Hi everybody,
I'm trying to do a sort of an analalog touch control system, it is for mobiles platform (currently tested in Defy+ and Galaxy S3) so i hope that the moviles developers could help in this one.
Well, the problem is that i can't get the control to work correctly, so far i manage to make the character move correctly as long as the screen does not move, but once the character move and the screen moves along with it, the does not work anymore. I think that this is happening because the layer parallax property (in which is the control pad) is set to 0,0.
This is the only "code" or event i'm using to create the movement.   .
And here is the .capx

I would really apreciate if someone could help me to figure this out.
Thanks in advance!
B
28
S
5
G
4
Posts: 51
Reputation: 3,857

Post » Fri Aug 31, 2012 6:04 pm

Use touch.AbsoluteX and touch.AbsoluteY instead of touch.X and touch.Y to get the touch position on the canvas rather than the position on the layout.
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,020

Post » Fri Aug 31, 2012 6:34 pm

Thanks @ramones!!!! really helpful, and really fast too,
Now it works perfectly! Thanks again!
B
28
S
5
G
4
Posts: 51
Reputation: 3,857


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, abdalghani, Ethan, Marxally, Naightwolf and 25 guests