what is the difference with using addforce and velocity when we want our player to jump?both of them produce almost the same effect
There are different ForceMode options with AddForce. Other than that, I can’t think of anything.
Calling AddForce adds a force to the rigibody, while setting .velocity changes the velocity directly, ignoring previous velocities.
The different ForceMode options that @methos5k mentioned relate to if you care about the object’s mass or not, and if you want to represent an instant change in direction or a force applied over time.
My general experience is that setting velocity directly is much easier to handle. AddForce is for when you want things to look more realistic.
Agreed. I find movement to be a lot easier with velocity (including jumping), also.