- Home /
ForceMode.Acceleration estimated dst != covered dst with a single Addforce in effect
ForceMode.Acceleration: " In this mode, the unit of the force parameter is applied to the rigidbody as distance/time^2. "
For me this means that F = distance/time^2 and since I used no other forces, useGravity is off, drag is 0 there can't be other forces affecting the object.
my code:
void Start () { Vector3 force = new Vector3(X, 0); Invoke("Break", time); }
void FixedUpdate () { AddForce(force, ForceMode.Acceleration); }
void Break () { Debug.Log("break") Debug.Break(); }
Still if I replace the letters with my values 10 = 45,9/3^2(45,9 is the distance the simulation got me) it's not right. Distance should be 90. So what could have held my object back? What am I missing?
{driven crazy(in a funny way) by meddling with physics in unity3d}
Answer by Adrian · Aug 23, 2011 at 04:56 PM
The unit is distance/time^2 or better (distance/time)/time, i.e. velocity changed over time.
If you apply a force of 10 units over 3 seconds using ForceMode.Acceleration, then your rigidbody will be accelerated by 10 units/second per second. It will start out with 0 u/s and end up at 30 u/s at the end of those three seconds. This will give an average velocity of 15 u/s and result in the 45 units you measured (3 s * 15 u/s).
ForceMode.Acceleration and ForceMode.Force depend on how long a physics frame is. If the physics frame is ver long, much more force/velocity will be applied in that frame in compared to a short frame. In contrast, ForceMode.VelocityChange and ForceMode.Impulse do not depend on the frame time and will apply the force/velocity directly, meaning the actual force will change depending on your physics frame rate.
Your answer
Follow this Question
Related Questions
Calculate Position of Rigidbody after applying Force 0 Answers
Calculating force 1 Answer
Physic Material friction mathematical formula 0 Answers
Physic Material Friction Combine Mode lack of documentation? 2 Answers
Collision.impulse 2D equivalent 2 Answers