Bavragor Posted February 6, 2016 Share Posted February 6, 2016 Hi, I was wondering about the following: imagine a sprite moving along the 'world', colliding with borders and a bounce set to 1. How can you actually slow the moving sprite down gradually. I'm not talking about gravity here, I just want to slow the sprite's movement gradually down to 0. I tried drag and damping but I'm not getting any results towards my expectations. P.S.: Using Arcade Physics. Link to comment Share on other sites More sharing options...
AzraelTycka Posted February 7, 2016 Share Posted February 7, 2016 Hello, how about negative acceleration? That's how physics does it. Link to comment Share on other sites More sharing options...
AzraelTycka Posted February 7, 2016 Share Posted February 7, 2016 Well I can't edit my post, so just one addition. If you don't want constant deacceleration you can introduce a function instead of a constant into acceleration variable. Link to comment Share on other sites More sharing options...
Bavragor Posted February 7, 2016 Author Share Posted February 7, 2016 Thanks again Azrael for answering on my question. In the end I solved it by using a timer loop that decreased the velocity.x and velocity.y by a certain percentage. Link to comment Share on other sites More sharing options...
Recommended Posts