touch scroll/zoom map

Get help using Construct 2

Post » Fri May 29, 2015 11:17 am

so did anyone have a working .caps file of zoom in/out using mobile touch ....

if so please send me the file as I have tried all the possibilities but still didn't for success ....
Image
B
36
S
13
G
1
Posts: 99
Reputation: 3,051

Post » Fri May 29, 2015 11:21 am

LittleStain wrote:I don't understand what it means for the layer to move out of the layer..

maximum and minimum shouldn't be that hard to set by adding conditions
to the touchzoom>=0 event.
-system compare two values : InitialScale * (TouchCurrentDistance / TouchStartDistance) <= MaximumScale (you have to set this number yourself)
-system compare two values : InitialScale * (TouchCurrentDistance / TouchStartDistance) <= MinimumScale (you have to set this number yourself as well)



If we use the above code then too how to calculate touchcurrentdistance & touchstartdistance ???

Could anyone put some light on this ?
Image
B
36
S
13
G
1
Posts: 99
Reputation: 3,051

Post » Fri May 29, 2015 11:32 am

miketolsa wrote:
LittleStain wrote:I don't understand what it means for the layer to move out of the layer..

maximum and minimum shouldn't be that hard to set by adding conditions
to the touchzoom>=0 event.
-system compare two values : InitialScale * (TouchCurrentDistance / TouchStartDistance) <= MaximumScale (you have to set this number yourself)
-system compare two values : InitialScale * (TouchCurrentDistance / TouchStartDistance) <= MinimumScale (you have to set this number yourself as well)



If we use the above code then too how to calculate touchcurrentdistance & touchstartdistance ???

Could anyone put some light on this ?


The code I provided was/is based on the zoom example shipped with C2..
Open the new project dialog and put zoom in the searchbox, you'll find it..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Fri May 29, 2015 6:18 pm

Thanks for help me out .

But isn't their any simpler way to achieve this effect ?
Image
B
36
S
13
G
1
Posts: 99
Reputation: 3,051

Post » Fri May 29, 2015 6:31 pm

miketolsa wrote:Thanks for help me out .

But isn't their any simpler way to achieve this effect ?


I think achieving it with 11 events is pretty good..
What part if it do you think should be simplified?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sat May 30, 2015 5:32 am

@LittleStain I got my problem solved with the zoom template from construct2 example scene .....

The zooming works fine . But as we zoom out everything properly scale but when I zoom in the scale even goes beyond the original size of the screen i.e. its get even smaller then the actual size of the screen ....

So how can I stop the zoom in to the actual size of the screen ..... so that player can't zoom in beyond the actual size of the screen .....

Hope I have explained the problem well ......
Image
B
36
S
13
G
1
Posts: 99
Reputation: 3,051

Post » Sat May 30, 2015 9:32 am

You could add a condition to the zoom event..
system compare two values layout.scale < 1
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Previous

Return to How do I....?

Who is online

Users browsing this forum: Ryan Kocourek and 2 guests