Friction in Box2d?

Another way of doing this is to set linearDamping on your body. You could set this differently depending on the tile your object is on.

ApplyImpulse() instead of ApplyForce() works much better.

Friction is directed against the velocity of the body, regardless of other forces. If setting linear damping isn't enough or relying on a property of the b2Body is inappropriate, you can easily compute nonlinear friction forces and call ApplyLinearImpulse() or ApplyLinearForce() every frame. Query the velocity with b2Body.

GetLinearVelocity(), scale (nonlinearly) the result as desired to get the force, and invert the sign of both components. If you decide to stop the body (when it is slow enough to stick), SetLinearVelocity() does the trick without computations.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions