Page 1 of 1
DT with physics
Posted: Fri Sep 27, 2019 8:43 am
by Coder567
Hi I have a simple question.
When using functions such as Body:applyForce do I need to multiply the x & y with dt? As in love.update(dt). Or is it automatically applied?
thanks!
Re: DT with physics
Posted: Fri Sep 27, 2019 10:40 am
by pgimeno
Automatically applied.
Re: DT with physics
Posted: Fri Sep 27, 2019 10:45 am
by Coder567
thanks !
Re: DT with physics
Posted: Fri Sep 27, 2019 12:43 pm
by ivan
If you are using a fixed time step it might work - since you are applying the force at equal intervals. In all other cases you are bound to get inconsistent results.
Force is "mass*acceleration" where acceleration is "change in velocity/time" so time definitely plays a role with forces...
As opposed to forces, impulses don't need to use "delta".
Time is irrelevant for impulses because the impulse is strictly a "change in velocity*mass".
Impulses are used to change the velocity at specific points in time as opposed to forces which are used continuously over time.