How do I make a ball slow down quicker.

0 favourites
  • 5 posts
From the Asset Store
Bouncing ball
$9.99 USD
Template for a bouncing ball game, fully documented in comments and video
  • I'm having trouble figuring out how to make a ball slow down quickly. I do have angular damping at a 1 and that isn't slow enough. I don't want to change linear damping at all. The problem is it takes forever for the X velocity of the ball to hit zero. When the X velocity is between -0.99999... to 1 or 1 to 1.99999... it is almost unrecognizable from the human eye that it is moving. So i want the ball to completely stop when it is in between those numbers. Any Ideas?

  • You can check if the xVelocity is between -1 and 1 with two conditions.

    Basically this:

    Sprite.Physics.velocityX > -1

    Sprite.Physics.velocityX < 1

    Now there are a lot of conditions that can be used to do this. A basic one is the system->compare condition. And if you want it to work with more than one instance of sprite add a "for each sprite" condition above the two conditions.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Your idea worked but there is a problem, it only works in one direction. When the ball hits a wall the X velocity will go straight to 0 and mess it up. any suggestions

  • Those two conditions need to be in the same event block for it to work. The only way it would go straight to zero is if only one of the conditions were used.

  • Thanks for all the help. I finally figured it out

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