Pinch to zoom

Get help using Construct 2

Post » Tue Apr 09, 2013 3:49 pm

Thanks @R0J0hound for that example !
But it doesn't really works for me neither.
I wanted to be able to scroll and zoom on a big map. Scroll should be constrained to the boundaries of the layout and zoom should have a min and a max intensity.
Any idea about how to do that ?
B
20
S
9
G
4
Posts: 197
Reputation: 4,080

Post » Tue Apr 09, 2013 10:47 pm

I did more testings and results are a bit confusing.

on mine Samsung S3 after zooming it usually keeps 1 touch active. Touching screen adds one more touch, so it's impossible to scroll anymore cause it's start to zoom due to two active touches. Reload page only can fix this. Tested on default browser and chrome for mobiles.
Same thing happens on different samsung mobile and htc, but it works perfectly on iphone 5 (?!).

How is this possible?

Here is the link to this simple project
http://dl.dropbox.com/u/34375299/testy/New%20project1213/index.html

Text object display
-fps
-layer scale
-touch counts

Can someone test it and post your results and phone/pad model?
As far as I can see touch event don't work the same on android and ios :/
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Tue Apr 09, 2013 11:19 pm

Ok, here's the feedback for an ipad 2 :
- scroll is ok
- zoom is works but very eraticly. Sometime you pinch and it zooms out, sometimes the oposite.
- zoom scale range is between 1 and 0,5
- fps varies from 59 to 61 wen zooming, stays at 60 when no action.
- scrolling has no layout constraints. It's easy to make the map (Poland !) disappear in the margins.

Hope it helps
B
20
S
9
G
4
Posts: 197
Reputation: 4,080

Post » Wed Apr 10, 2013 12:14 am

yep, all true heh
What about touch counts? Did it stays at 0 all the time after you finished "fingering" the screen? That's my biggest concern, after testing it on few android mobiles it usually stuck at 1, like touch event never stops.
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Wed Apr 10, 2013 8:20 am

Let's see.
touc count :
- One finger on screen : 1
- Two fingers on screen : 2
- 3 fingers : 3
...
no finger on screen : 0

On ipad 2, touch event stops as it should
B
20
S
9
G
4
Posts: 197
Reputation: 4,080

Post » Wed Apr 10, 2013 10:33 pm

Testing on ipad 3 using safari:

I find that if I use a finger from each hand on either side of the screen, it registers two touches and runs really smoothly, but if I use a finger and thumb from just the one hand to pinch with it flickers around between zoomed in and zoomed out (even when I'm not pinching) and can't quite work out if I'm touching the device with two or three fingers.
B
12
S
3
G
1
Posts: 235
Reputation: 2,053

Post » Sat Apr 13, 2013 2:23 pm

@shinkan : any success with this issue, yet ?
B
20
S
9
G
4
Posts: 197
Reputation: 4,080

Post » Sat Apr 13, 2013 3:00 pm

@Laurent nope, sorry. Issue is still here :/
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 14 guests