swipe to scroll to set points

Get help using Construct 2

Post » Mon Jun 17, 2013 8:29 pm

Hi all,

I am trying to create a swipe navigation to move around a map. I have created a test capx using the image below.



capx

I want to be able to use a swipe gesture (up/down, left/right) to move the map to centre on the next square. I have managed to get my capx to move between the 1st and 2nd squares (red and blue) but it won't go to any others. I don't know why, I maybe doing it completely wrong! I would also like it to scroll smoothly but at the moment mine just pings to the next square.

Does anyone know what I am doing wrong?

Thanks.
B
8
S
2
G
1
Posts: 63
Reputation: 880

Post » Mon Jun 17, 2013 11:49 pm

For the smooth scrolling, you could make a group that starts disabled, change the target position variable(s), and make it the view move towards the target at a small increment every tick until it hits the target, then disable the group... But that's still a bit crude, I'm sure lol.

I haven't had the chance to try any of it, so pardon me if it doesn't work well xD
B
4
Posts: 13
Reputation: 226

Post » Tue Jun 18, 2013 7:41 am

@exkage,

Thank you for taking the time to reply :)
B
8
S
2
G
1
Posts: 63
Reputation: 880


Return to How do I....?

Who is online

Users browsing this forum: bazmat1963, bikachu, LaurenceBedford, lucstanislash, oosyrag, plinkie and 13 guests