Change ScrollX Slowly?

Get help using Construct 2

Post » Wed Mar 06, 2013 12:57 am

Hi, I was wondeirng if there was some kind of method to change Scroll X slowly rather than instantly? In my game, I make sure the player can see further ahead than if the scroll was focussed on them. The result is that when the player turns to the opposite direction, the ScrollX instantly changes position so that they can see further ahead in that direction and it looks kind of silly, not to mention distracting.

In most sidescrollers I've noticed the player can move across the screen a certain distance before the screen actually scrolls and I think this would be a good way to do it... I just can't think of how. Any ideas?

Thanks! Jim152013-03-06 00:57:56
B
16
S
2
G
1
Posts: 156
Reputation: 2,112

Post » Wed Mar 06, 2013 1:05 am

lerp(scrollx, targetx, 0.1)
Moderator
B
72
S
13
G
11
Posts: 900
Reputation: 11,783

Post » Wed Mar 06, 2013 3:16 am

So that's what lerp does. :P

Thanks, thehen
B
16
S
2
G
1
Posts: 156
Reputation: 2,112


Return to How do I....?

Who is online

Users browsing this forum: badmoodtaylor, Baidu [Spider] and 16 guests