object is sliding

Topics: User Forum
Apr 20, 2008 at 2:58 PM
Edited Apr 20, 2008 at 2:59 PM
im new to farseer and physic engines in general, so my problem may be that i use the given stuff in a wrong way ;)

i wanted to test the engine by letting a box fall from the sky and let it collide with another box and the ground. works fine but the box never stops moving (it slides).

this is my code

this is the result
(avi with 127kb)

i tested it with different settings for gravity and mass but its not changing in the right way.

can anyone help me?
Apr 20, 2008 at 6:27 PM
Try to set the values RestitutionCoefficient and FrictionCoefficient of your geoms to something like:

geom.RestitutionCoefficient = 0.0f;
geom.FrictionCoefficient = 1f;

This should stop the sliding.
Apr 20, 2008 at 9:43 PM
thanks. friction was what i needed.