Slippery surface not maintaining momentum

0 favourites
  • 3 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • 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)?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)