How do I smooth zoom the camera in/out based on player speed

Get help using Construct 2

Post » Fri Feb 20, 2015 9:50 pm

I'm making a side-scrolling downhill biking game and since the player needs to have good visibility of the track ahead of him. At low speeds the player doesn't need to see as much of the level as when he's going at high/top speed. So I want to have the camera zoom out as the speed increases and zoom in again when the speed decreases. I know how to zoom in and out using layout scale but I can't wrap my head around the solution to make the player speed decide the zoom level in a smooth way.

If anyone has a solution, I'd love to hear it. Thanks in advance.
B
10
S
2
G
1
Posts: 49
Reputation: 693

Post » Fri Feb 20, 2015 10:30 pm

https://m.youtube.com/watch?v=erl_TlE4rrU
In this video he explains it.
Playable games:
http://jamesxxxyz.newgrounds.com/
Newest: Blue and red arrows
Latest update: Blue and red arrows

What you want in C3?
viewtopic.php?f=146&t=122050

Youtube: https://www.youtube.com/channel/UCLE7Ml ... /playlists
B
11
S
4
Posts: 281
Reputation: 1,543

Post » Fri Feb 20, 2015 10:46 pm

Thank you that did it! I had a suspicion that lerp was involved, but I didn't know the method well enough to figure it out on my own. It's still rough atm, but I understand how it works now so I'll no doubt be able to fine tune it to my exact specifications.
B
10
S
2
G
1
Posts: 49
Reputation: 693


Return to How do I....?

Who is online

Users browsing this forum: gamewolf337 and 9 guests