What is the best way to limit speed with physics?

0 favourites
  • 3 posts
From the Asset Store
Best car suspension with spring effect and very cool terrain generation.
  • Hi, I'm playing around with physics in construct 3 and I need a better way to limit speed right now I just add a force to on the x axis to add speed and obviously that just makes it go flying if held down for long enough and im looking for a way for it to accelerate then keep a constant speed at the peek.

  • One way is to reduce the force applied towards zero as the object's velocity increases to it's max speed.

    Another way is to apply an equal and opposite force as the objects approaches it's max speed. In real life this is how terminal velocity works, as wind resistance opposed to gravity when falling for example. Or friction, on a horizontal plane.

    The last way is to manually set the x and y velocities to maxmin(currentvelocity,maxvelocity) every tick. You'll have to do a little vector math to get the maximum x and y velocity for any given angle of motion. This could be the simplest solution, but manually setting velocity can also possibly cause issues down the road.

    Edit: I did mean min, thanks for the catch dop.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The last way is to manually set the x and y velocities to max(currentvelocity,maxvelocity) every tick

    I think you meant min(currentvelocity,maxvelocity)

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