I was playing around with the love.physics and wanted to make a circle move at a fixed speed towards the right. I tried to use "Body:applyForce" but the problem is that it keeps speeding up and going faster and faster. Is there a way to move at a fixed speed or to limit "Body:applyForce" to not keep applying force once the X velocity is over a certain amount?
Thanks a lot in advance!
Love.Physics question! [SOLVED]
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Love.Physics question! [SOLVED]
Last edited by Jeeper on Sat Mar 30, 2013 12:45 am, edited 1 time in total.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Love.Physics question!
You could call Body:getLinearVelocity() and only apply force if the horizontal velocity is smaller than a certain number.
Help us help you: attach a .love.
Re: Love.Physics question!
Ah, that is really smart, thanks a lot !Robin wrote:You could call Body:getLinearVelocity() and only apply force if the horizontal velocity is smaller than a certain number.
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 42 guests