I use applyForce or applyLinearForce to push back an enemy when I attack them. Although, the problem is that if I attack him he seems as if he doesn't have any friction applied to the ground. He goes sliding off into the opposite direction. This also happens if I hit them midair, they go flying off!
In real life, this doesn't happen. If you push a guy, he doesn't go sliding across town. What factors can you suggest need tweaking in order to correct this? Any help would be greatly appreciated!
Force (F) is measured in Newtons and related to acceleration:
F = m*a
m = mass
a = acceleration (change in velocity over time)
"applyForce" is generally used over time,
For example if you call "applyForce" for 10 seconds in a particular direction, you will get a "thrust" effect.
I think you are looking for "applyImpulse".
Impulse (J) is related to change in velocity (not acceleration!):
J = m*Vdt
m = mass
Vdt = change in velocity
So you want your enemies to fly off when you hit them, you would call "applyImpulse" only once where "Vdt" would the change in velocity.
For example, if you want the enemy to fly off at 10 meters per second, just multiply 10 by the enemy's mass.