Objects always moving

Topics: User Forum
Jan 5, 2009 at 4:08 PM
Hi,

so far I am very impressed. I am experimenting with the engine in Silverlight 2 and for the most time, the physics simulation is really great. But I have the following problem:

In my demo (as said in SL 2) I drop some simple 32x32 pixel Squares onto each other. The issue is that those that have a stable location (i.e. one square standing on two other squares) and thereforce should not move, move nonetheless.
The squares always seem to "shiver", "slide" or slightly move somewhere although they should stand perfectly still.
Now I am new to the engine and maybe this issue can be resolved tweaking some parameters. Here the current parameters in use (though I have tried lots of configurations):

- Gravity is (0, 400) downwards (seems a bit big, but otherwise the squares fall too slowly, and I don't want them to have a giant mass)
- Squares have the Size 32x32, SetDisplayUnitToSimUnitRatio is not used and their mass is 10
- FrictionCoefficient of the Square-Geom is 0.8f and RestitutionCoefficient is 0.1f
- When I call Update on the Simulator I use the amount of seconds since the last update as parameter (= small float values like 0.01)

I don't use AllowedPenetration and BiasFactor, to be honest because I don't know what they do ;-)
It would be great if someone would explain these two parameters to me.
Also, is there any real Documentation on the classes, methods etc. provided by the engine? This would help a lot.

Hopefully someone can help me resolve this problem.
Thanks in advance!

WhiteRabbit
Jan 5, 2009 at 8:09 PM
I have the same problem in my project when I set the mass to high, if I have it at 1-2 the objects become stable and come to rest but higher then that and they behave like you explain
Jan 5, 2009 at 8:22 PM
I am far for an expert in the field so I might be out of subject with this, but try setting the body linear drag coefficient and rotational drag coefficient to higher values, this might do the trick.
Coordinator
Jan 5, 2009 at 9:41 PM
We currently only have our manual (found here) and the code documentation found on each class inside the source code (Used by Visual Studio Intellisense). I will take a look at generating some msdn style class documentation for future versions.

As for the stacking of boxes: It's hard to stack boxes on each other in a stable manner. Take a look at the Pyramid demo from the samples. It's optimized for stacking. You might also be able to improve stacking by using the inactivity controller and tweaking some of it's properties to match your preferences.
Jan 5, 2009 at 11:29 PM
Thank you for your replies.

Setting the Linear or Rotational Drag Coefficents sadly did not work.

Strangely, the documentation comments are not shown in my intellisense although - as you said - most classes, properties etc. are commented when I look into the source files.
Still, some Properties are uncommented, making it a trial and error attempt to find out what they do or what values they accept (some take [0..1], some much higher values, I see no way to figure this out without proper documentation).
So I really hope that there will be a real documentation of every public member of the classes in one of the next versions.
Apart from that, the engine is a blast to work with in Silverlight :)


Coordinator
Jan 5, 2009 at 11:32 PM
If you included Farseer Physics as a DLL file instead of the whole project, you will loose the code documentation as it's not included as an XML file. You can enable XML file generation in the build properties of the Farseer Physics project (or include it as a project).

As for the documentation, I'm writing more and more documentation as I traverse the code. I will write it on the todo list that we need more code documentation.