- Home /
Difference and uses of rigidbody force modes ?
Hi, i have recently been working on physics bases grapple hook, mostly used just to pull the player in with optional forces added to sides.
anyway i would like to know what is the difference between the force modes to addforce and which one would be best , thanks for your help in advance, will pick correct answer.
Answer by sevensixtytwo · Sep 13, 2014 at 12:02 AM
ForceMode.Force - Applies a gradual force on the Object, taking mass into account. This is a literal pushing motion where the bigger the mass of the Object, the slower it will speed up.
ForceMode.Impulse - Applies an instant force on the Object, taking mass into account. This pushes the Object using the entire force in a single frame. Again, the bigger the mass of the Object, the less effect this will have. Great for recoil or jump functions.
ForceMode.Acceleration - Same as ForceMode.Force except that it doesn't take mass into account. No matter how big the mass of the object, it will accelerate at a constant rate.
ForceMode.VelocityChange - Same as ForceMode.Impulse and again, doesn't take mass into account. It will literally add the force to the Object's velocity in a single frame.
Answer by SugarDad · Jul 26, 2020 at 01:21 PM
Force - with mass and Time.fixedDeltaTime
Force = Vector3.forward*1.0f * Time.fixedDeltaTime / (rigidbody.mass);
Impulse - with mass only
Force = Vector3.forward*1.0f / rigidbody.mass;
Acceleration - with Time.fixedDeltaTime only
Force = Vector3.forward*1.0f * Time.fixedDeltaTime;
VelocityChange - not with mass nor with Time.fixedDeltaTime
Force = Vector3.forward*1.0f;
You can go to the link below to see the four examples. https://answers.unity.com/questions/802181/trying-to-understand-rigidbody-forcemode-derivatio.html
Your answer
Follow this Question
Related Questions
Ball Rotating Help 0 Answers
Rigidbody AddForce Forcemode.Impulse not working 2D game... 2 Answers
About Forces and Time.deltaTime 3 Answers
Add Force without Rotation 2 Answers
AddForce not influenced by rotation 1 Answer