How do I make a soft zooming screen... I

Get help using Construct 2

Post » Sun Dec 21, 2014 6:29 am

hi guys, how can I make a soft zooming screen... I attach my sample .what should I change here ? thanks :)
You do not have the required permissions to view the files attached to this post.
B
37
S
16
G
2
Posts: 451
Reputation: 4,873

Post » Sun Dec 21, 2014 8:31 am

just add a lerp: scirra.com/tutorials/378/creating-a-smooth-sliding-effect-with-lerp
It's in-build in construct 2
B
8
S
1
Posts: 41
Reputation: 550

Post » Sun Dec 21, 2014 9:21 am

hmmm still too hard for a beginner :/
B
37
S
16
G
2
Posts: 451
Reputation: 4,873

Post » Sun Dec 21, 2014 9:58 am

Nah, its dead easy.

create a variable called t and one called duration, set duration to the number of seconds you want the transition to take
- on every tick
-- set t to min(t+dt/duration, 1)

Then
in your on collision event.
-- lerp(canvas_size_start, canvas_size_zoomed, t^2)

That should get you started, you may need to reset t to zero after the transition has taken place.
B
7
S
1
Posts: 27
Reputation: 511

Post » Sat Dec 27, 2014 2:18 pm

hi thanks 4 ur answer...but it's still not so clear. Can u post a sample capx ?
thanks alot :)
B
37
S
16
G
2
Posts: 451
Reputation: 4,873

Post » Sat Dec 27, 2014 9:50 pm

Maybe check out the MagiCam add-on.

I suggest you bookmark this page as there is lots of cool stuff on here
https://www.scirra.com/forum/c2-plugins-and-behaviors-list_t65170

Search 'magicam' on that page and follow instructions.

I also think it's a good idea to understand lerp() and other stuff too. But it's horses for courses, as they say..
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Sat Dec 27, 2014 9:54 pm

thanks :)
B
37
S
16
G
2
Posts: 451
Reputation: 4,873


Return to How do I....?

Who is online

Users browsing this forum: Baidu [Spider] and 10 guests