# Why use AddForce rather than modify velocity?

I’ve looked all over, and while I’ve seen comments about modifying rigidbody.velocity being a bad idea, I haven’t really noticed why. Assuming the velocity change is calculated properly, is there any difference between using it and using addForce?

If I add a force that will result in a velocity change of 1, or simply modify the velocity by 1, is there any difference in what actually happens in terms of gameplay and/or performance?

No, there’s no difference. AddForce has actually different modes:

They all result in an immediate velocity change, but with a different scale.

Force and Impulse are divided by the objects mass, acceleration and velocitychange are not.

Force(`m*kg/s²`) and acceleration(`m/s²`) are computed so the value represents a change per second when applied every physics frame (in FixedUpdate). Velocitychange and Impulse are in `Δm/s` or `Δm*kg/s`

This all assumes the guideline that mass is in kg and 1 unit is 1 meter.

Rigidbody Velocity and Rigidbody Addforce are two confusing functions in Unity 3D and often beginners fail to understand their difference. In This Article, we are going to discuss the difference between RigidBody.velocity and RigidBody.addforce.

In both cases, whether it is Addforce or velocity function we are going to use the term force to explain them.

When we are using Rigidbody.velocity , then, in that case, we are adding force to our object but this force will only move the object unless and until we keep applying force.

For example

body.velocity= new Vector3(0,0,5);

Let say you have added 5f in z position and that force will be added when you’ll press W key.
So When you will press W key the object will instantly start at the speed of 5. It’s like the same if you are adding force using this function on a car, that car will start at the speed of 5.

body.velocity= new Vector3(0,0,200);

And if you let say change the value to 200 and then after saving press W. Car will start running at the speed of 200 from starting which is not possible in real world.

Now If you talk about Rigidbody.addforce

By Continuing our Car example. if you add the force of 200 to car

body.addforce(0,0,200);

The Car will not start moving at the speed of 200 if we press W but it starts from slow and then increases its speeds and stops according to the value of Drag.

Rigidbody.addforce starts slow and then speed up, just like you are dragging a heavy table, first you will start pushing that table, the table will just move a little bit from its position but if you keep pushing that table it will starting moving & if you leave that table it will cover some distance depending on surface and that’s the same rigidbody.addforce do.

You can use Rigidbody.velocity where you just want to move your object to react instantly like player jump & the result of that force will vanish just after the jump and you can use Rigidbody.addforce where you need slow start and then the continuous movement like a rocket. If you use Rigidbody.addforce in jump , Player/Object will remain in space for a while and then will come back to ground .

For more with video visit here

one thing i can think of is that modifying the velocity would instantaneously set that velocity yea?

i suppose you would achieve a similar effect if the object in question was as rest, but if you were to apply this to a moving object per se, addforce would have to oppose the other force first while velocity would just immediately change it

tl;dr addforce would display more accurate physics

Rigidbody Velocity and Rigidbody Addforce are two confusing functions in Unity 3D and often beginners fail to understand their difference. In This Article, we are going to discuss the difference between RigidBody.velocity and RigidBody.addforce.

In both cases, whether it is Addforce or velocity function we are going to use the term force to explain them.

When we are using Rigidbody.velocity , then, in that case, we are adding force to our object but this force will only move the object unless and until we keep applying force.

For example

body.velocity= new Vector3(0,0,5);

Let say you have added 5f in z position and that force will be added when you’ll press W key. So When you will press W key the object will instantly start at the speed of 5. It’s like the same if you are adding force using this function on a car, that car will start at the speed of 5.

body.velocity= new Vector3(0,0,200);

And if you let say change the value to 200 and then after saving press W. Car will start running at the speed of 200 from starting which is not possible in real world.

Now If you talk about Rigidbody.addforce

By Continuing our Car example. if you add the force of 200 to car

body.addforce(0,0,200);

The Car will not start moving at the speed of 200 if we press W but it starts from slow and then increases its speeds and stops according to the value of Drag.

Rigidbody.addforce starts slow and then speed up, just like you are dragging a heavy table, first you will start pushing that table, the table will just move a little bit from its position but if you keep pushing that table it will starting moving & if you leave that table it will cover some distance depending on surface and that’s the same rigidbody.addforce do.

You can use Rigidbody.velocity where you just want to move your object to react instantly like player jump & the result of that force will vanish just after the jump and you can use Rigidbody.addforce where you need slow start and then the continuous movement like a rocket. If you use Rigidbody.addforce in jump , Player/Object will remain in space for a while and then will come back to ground .