[ODE] Telling contact joints from "every other joint" for the
purposes of proper non-collision between jointed bodies?
Jon Watte (ODE)
hplus-ode at mindcontrol.org
Tue Aug 16 14:28:04 MST 2005
For each body, I have an overarching 'controller' (or "entity"). I
ignore collisions between geoms that have the same controller. I store
the controller in the "user info" field. Btw: All static geoms are in a
different space, and won't even inter-collide.
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