[ODE] Telling contact joints from "every other joint" for the purposes of proper non-collision between jointed bodies?

Megan Fox shalinor at gmail.com
Tue Aug 16 15:37:58 MST 2005


Well nut bunnies, my eyes just glazed right over that function.  Yeah,
that's exactly what I needed, thanks!

... I also have a concept of entities, and I like your idea, but I'm
trying my best to support ragdolls that can crumple over themselves -
no legs that can clip through eachother or anything like that.


Thanks,
-Megan Fox

> There's also the "are connected excluding" function, which allows you to
> see whether two bodies are connected using joint types other than your
> argument (which, presumably would be the contact joint type).
> 
> Cheers,
> 
>                        / h+
> 
> 
> Megan Fox wrote:
> > My problem is thus - if I walk up next to another character, such that
> > we're colliding, and I then swing my sword, the sword's collision gets
> > ignored.  This is because, when the entities are in contact, a contact
> > joint is generated between them - and my code to ditch any collisions
> > between jointed bodies, catches this, and ignores ALL collisions until
> > that joint is resolved (this includes the weapon collision).
> >
> > The solution is to take that bit of code out of my collision callback,
> > and allow jointed bodies to collide, but this will most certainly
> > cause problems when I get back to ragdolls and their proper
> > implementation.  If I allow collision between ragdoll limbs, it'll
> > screw up their flexibility and stability (blah blah blah, well known
> > topic, and so on).
> >
> >
> >
> > The method to fix this that I've come up with is:
> >
> > 1.) Detect if two bodies are jointed
> > 2.) Grab the number of joints
> > 3.) Check all joints for a non-dContactJoint type
> > 4.) If there is a non dContactJoint joint between these bodies, it's a
> > "real" jointed body set, so don't collide.
> > 4.5.) If there are only dContactJoint's between the bodies, it isn't
> > jointed, continue
> >
> >
> > But that seems a trifle overkill for what seems like a simple problem.
> >  Does anyone have a better solution?
> >
> >
> > Thanks,
> > -Megan Fox
> > Lead Dev, Elium Project
> > http://www.elium.tk
> >
> > _______________________________________________
> > ODE mailing list
> > ODE at q12.org
> > http://q12.org/mailman/listinfo/ode
> >
> >
>



More information about the ODE mailing list