Oct 5, 2010 at 3:56 AM
Edited Oct 6, 2010 at 4:22 PM
This post is the definition of a "living document!" :-P
1. Poly-mesh collisions are the most wonky that I've seen. Poly-poly seems to be working pretty well.
2. No, your sample ragdoll seems to work perfectly.
3. Does the trick; now my ragdoll can't trip up on himself.
Again, thanks for the help!
4. If I set the mass properties of the head to be MassProperties.Immobile, everything attached directly or indirectly does not fall either. So, for example, I set my head sphere to be MassProperties.Immobile, and now the body and limbs had no
gravity. Is that on purpose?
5. I occasionally get a NullReferenceException by the following code:
private class ConstraintComparator : Comparer<Constraint>
public override int Compare(Constraint x, Constraint y)
if (x is ContactConstraint ^ y is ContactConstraint)
return x is ContactConstraint ? 1 : -1;
float d = MathHelper.Min(x.BodyA.World.Position.Z, x.BodyB != null ? x.BodyB.World.Position.Z : 0f) -
MathHelper.Min(y.BodyA.World.Position.Z, y.BodyB != null ? y.BodyB.World.Position.Z : 0f);
return d == 0f ? 0 : (d > 0f ? 1 : -1);
Where x is null, and y is a UniversalJoint. It gets the null reference line on calculating d.
6. I think I know what I need to do. So, I was manipulating positions and orientations rather directly via SetWorld. I was doing that every tick to the head of my ragdoll, so I could dangle him like a puppet. Unfortunately for the
poor physics system, it thought it was still falling. This created the disconnect between the joints which I wasn't changing the position of, and the head that was being "frozen" into place manually. It only hit me a few minutes ago:
"duh, your picking and dragging of objects is exactly the same as me holding the head of my ragdoll in place." So, thus, I have found the GrabConstraint. I have tried it out and seems to work great!
9. The polyhedron to mesh collision is really really iffy at times... I have stuff falling through /constantly./ Ideas, suggestions, tips?