[SOLVED] Pin ChildList objects

edited May 2011 in Help request
I'm trying to create a human body from several parts. I've got sprites for: head, torso, and limb. Basically, Head is the parent of Torso, Torso is the parent of ArmL/ArmR and LegL/LegR (the latter 4 all use the Limb sprite).

I try to keep all these bits together by using the ChildList property in the config file; however, as the physics simulation progresses, they end up being disconnected and bouncing all over the place. I'd like to essentially "pin" the torso to the head, and the limbs to the torso, so that they all rotate around their respective pivots, but remain connected as...well, as a normal human generally would.

Any ideas?


  • edited May 2011
    Yep, you probably want to try the ChildJointList property in addition to ChildList.
    For each child you can then define a joint. In your case you probably want to use joints of type revolute.
    There are more details in CreationTemplate.ini but this feature is only available on the svn, not in the 1.2 release.
    For detailed info, you can have a look to Box2D doc as they're the base for orx's joints.

    Let me know if it works for you! =)
  • edited May 2011
    Yup, as usual you're quick and on the money. That did it.

    Out of curiosity, if I want the arms *not* to drag the rest of the body down---that is, I want them to point downwards, but not contribute to pulling all of their parents down---is there a way to disconnect their pull on the parents?
  • edited May 2011
    Glad it works! I'm not a big Box2D expert but I think you should (hopefully) be able to do that by playing with the Density parameter.
Sign In or Register to comment.