object is sliding

Topics: User Forum
Apr 20, 2008 at 2:58 PM
Edited Apr 20, 2008 at 2:59 PM
hi
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
http://rafb.net/p/KXyNrT62.html

this is the result
http://www.xup.in/dl,53949732/farseer_test_2008-04-20_16-48-30-98.avi.AVI/
(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.