Slippery surface not maintaining momentum

Discussion and feedback on Construct 2

Post » Wed Sep 14, 2016 8:08 pm

Hello, I will start by mentioning that I had created a icy surface and when the player is over it his deceleration is set to 50, this produces the slide effect but, when the player moves left or right there is no resistance momentum like in many platformer games.

I have fiddled around with a few calculations influancing the DX and DY of the player but in all cases have't found a way that feels right.

Anyone here know a good way to add this sliding momentum(I do not know a good way to explain this)?
B
4
S
1
Posts: 15
Reputation: 384

Post » Wed Sep 14, 2016 8:36 pm

I suppose slippery means 3 things. Slow acceleration. Slowly decelerate. Animations.

For the first two you have the actions ... Sprite > platform ..
Set acceleration & Set deceleration

Setting the deceleration to a low value will slip.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Wed Sep 14, 2016 9:01 pm

You can achieve that if you use a physics behaviour instead of the platformer behaviour, apply impulse of 10 for example if the Right key is down, and apply impulse of -10 if the Left key is down. Set the ground friction to a value between 0.1 and 0.3.
You'll notice that when you switch from Left key press to Right key press while sliding, the player wont switch direction immediatly, instead he will keep sliding for a second then slowly gain momentum to the desired side.

I've tried it before and it worked for me, but you will encounter some problems with slopes.
Banned User
B
17
S
7
G
23
Posts: 388
Reputation: 13,994


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 11 guests