Right now in my program I have a simple box falling unto the floor. The floor is immovable. But when the falling box hits it wil not stop vibrating and will continue to do so until it falls off the edge. I went through the tutorial and I have the same code. What is there that I can do the stop the jittering of the box?
This might be a bit late posting, but i had a similar issue.
I was using a version of the SetMass function like in the JigLibXGame example and was setting the itCom as the inertia tensor after calculating the mass. To resolve it i just didnt set the intertia and it works fine. The problem i think is from not translating the collision skin to the - center of mass. either way it works fine right now.
sorry about the quick response, i've been dealing with this issue more now. It works fine for me when i don't set a inertia tensor. But otherwise i get a jitter. I've uploaded a video of it if anyone can help point me in the right direction.
http://www.2shared.com/file/8318500/608cc05a/Nagy_2009-10-09_06-32-35-70_mpeg4_001.html — sorry about the mp4 format if its a issue for anyone let me know.
I'm using a fixed timestep 1.0f/100.0f, all box primitives ( including the floor ), and the floor doesnt have a body, just a collisionskin.
What i'm doing is parsing and constructing the physics, and then i apply them to the animation skeleton once physics is enabled on the actor. So at one point all the bodies are ontop of eachother at 0,0,0 . To bind them to the skeleton i use MoveTo on the bodies. Has anyone had problems similar to this when with overlapping bodies?
if anyones intrested this is what the physics layout is in xml. if anything pops out about the units i'm using (meters)
<?xml version="1.0" encoding="utf-8" ?> <Physics type="Hierarchy" targetModel="Content/basic" material="Standard.Plastic"> <Body name="head" bone="Bip01.Bip01_Pelvis.Bip01_Spine.Bip01_Spine1.Bip01_Spine2.Bip01_Spine3.Bip01_Neck.Bip01_Head"> <Shape primitive="JigLibX.Geometry.Sphere" > <Parameter type="Microsoft.Xna.Framework.Vector3">0.0,0.0625,0.0625</Parameter> <Parameter type="System.Single">0.125</Parameter> </Shape> </Body> <Body name="spine0" bone="Bip01.Bip01_Pelvis.Bip01_Spine"> <Shape primitive="JigLibX.Geometry.Box"> <Parameter type="Microsoft.Xna.Framework.Vector3">-0.0625,-0.0625,-0.0625</Parameter> <Parameter type="Microsoft.Xna.Framework.Matrix"></Parameter> <Parameter type="Microsoft.Xna.Framework.Vector3">0.125,0.125,0.125</Parameter> </Shape> </Body> <Body name="spine1" bone="Bip01.Bip01_Pelvis.Bip01_Spine.Bip01_Spine1"> <Shape primitive="JigLibX.Geometry.Box"> <Parameter type="Microsoft.Xna.Framework.Vector3">-0.0,-0.0625,-0.0625</Parameter> <Parameter type="Microsoft.Xna.Framework.Matrix"></Parameter> <Parameter type="Microsoft.Xna.Framework.Vector3">0.0625,0.125,0.125</Parameter> </Shape> </Body> ... <Configuration name="ragdollX"> <Immoveables> <Body>head</Body> </Immoveables> <Controller type="Hinge" axis="1,0,0" collideable="false"> <Body>neck</Body> <Body>head</Body> </Controller> ... </Configuration> </Physics>
and if anyones curious the materials used on all primitives is 0.8 0.8 0.7
Hope this is a easy one to answer for people that are experienced with the library. I'm still learning, but i really love it so far.
So after more tests i've concluded the issue. I've posted about it here http://jiglibx.wikidot.com/forum/t-188737/lower-scaled-primitives-cause-jittery-physics-against-other-primtiives