-
Hey! Very nice project, currenty porting this into the rbfx game engine. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Hello, I'm assume we're talking about Body::AddForce? Forces are reset every physics update, so you don't need to reset them (you just need to keep applying them every frame). Regards, |
Beta Was this translation helpful? Give feedback.
-
Oh, what I actually mean is the effect of the force. Even tho the effect is applied just once, between two steps, its effect will stay until it faded out. |
Beta Was this translation helpful? Give feedback.
-
The 'effect' of a force is a change in velocity (and thereby also position) in the next update. There is no effect beyond that, so there's nothing to 'fade out'. Once moving, a body will continue to move forever at a constant velocity until an opposing force is applied, usually through friction or damping (see: BodyCreationSettings::mFriction, mLinearDamping and mAngularDamping), but I wouldn't call this 'resetting' or 'fading out' of force. |
Beta Was this translation helpful? Give feedback.
-
Oh, wow, I actually didn't expect it to be that simple. Thanks for the explaination! I somehow expected it to be rocket science or something. 😁 |
Beta Was this translation helpful? Give feedback.
The 'effect' of a force is a change in velocity (and thereby also position) in the next update. There is no effect beyond that, so there's nothing to 'fade out'. Once moving, a body will continue to move forever at a constant velocity until an opposing force is applied, usually through friction or damping (see: BodyCreationSettings::mFriction, mLinearDamping and mAngularDamping), but I wouldn't call this 'resetting' or 'fading out' of force.