This project has moved and is read-only. For the latest updates, please go here.

Hacking sample7 ragdoll, to follow body but not collide with it

Topics: Developer Forum, User Forum
May 9, 2012 at 5:11 AM

I want the ragdoll sample to have the ragdoll follow a body.  A body that moves around the level according to physics (perhaps with a platformer like movement) yet to not have the ragdoll and the body collide, but have the body (and ragdoll) collide with everything else.


Is it collision categories I want to investigate?

or collison groups?  and i suspect I have to set every body in the ragdoll.cs to the same group/category I DONT want colliding with my followbody.




May 17, 2012 at 2:57 PM

Collision categories should solve you the problem.

Collision groups too, but it is less powerful (in collision groups, you have to set the same negative number to the group to the fixtures you don't want to collide between them, if I remember correctly). With Collision categories, just set each fixture to the same category, and then tell the engine to not collide between them in the CollidesWith property (with the ~ operator).

There's a thread here at the forum that explains how categories work, it should be somewhere around here.