How do I make my character skid when he is sprinting.

0 favourites
  • 4 posts
From the Asset Store
Design for game, asset for game, game kit, UI design, completed design for game, mobile game, Sprint Tap
  • I need help making my character skid when he is sprinting in one direction and then he moves in another

    like here

    Tagged:

  • You will want to implement some basic velocity and acceleration physics. Rather than letting the character move at a set speed when you press a key, have a variable called velX and velY for the character. Tell your character to move velX distance left/right every tick, and velY distance up/down every tick. When you press up, increase the vely by a little every tick, and when you press down, decrease it by a little every tick. Same for left and right on velX. Then lower both velocities by about 10% every tick to get natural deacceleration. This will make him slid around, and accelerate smoothly.

    .

    you can multiply the acceleration numbers by a speed variable to change how fast he is.

    Tweak the numbers how you see fit.

  • If you're using the platformer

    set running to when key pressed on the floor

    set skidding to when is moving but not pressing the key on the floor

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello again sorry for not replying for so long didn't know if this was going to work but I just tried it and it works kind of, he gains speed when he is right but when he is left it decreases so I don't understand how he will skid you weren't really clear where I should put the self. and the other things, I'm sorry I haven't replied for so long ill try again thank you for helping though Haypers.

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