Page 1 of 1

Help Building Body -- Can't Get Joints Working how I Want

Posted: Sun Apr 10, 2011 11:20 am
by mjvotaw
So I'm working on my first iPhone/iPad app for a client, it's a simple paper doll house, nothing too fancy. We want to give the dolls a ragdoll-esque feel to them when they're picked up, so we need to build the body out of several physics parts.

Being new to Chipmunk/physics simulation in general, I'm having a really hard time figuring out what joints to use, and how to use them. At the moment I've just got the head and torso, joined together with a pin joint. When you grab one piece and move the body around, they stay 'connected' with the joint, but the joint has too much play on it; the pieces visually come apart and take a few seconds to get back to where they should be.

I've been looking around for a decent example of how more complex objects are built from cpBodies, but most of the example code I'm finding is just for simple objects like balls and boxes :/

Can anyone help me?

Re: Help Building Body -- Can't Get Joints Working how I Want

Posted: Sun Apr 10, 2011 1:38 pm
by mjvotaw
Nevermind, I'm retarded. For the past 2 days I've been reading forum posts talking about everything except what I need. Finally dug through some demo code and realized what I'm looking for is the pivot joint.

Perhaps it's just more obvious to everyone else, but the fact that the "Joints and Constraints" demo video doesn't describe such a simple joint was really throwing me off. 'Surely they're describing all of the joints', I kept thinking to myself...

Re: Help Building Body -- Can't Get Joints Working how I Want

Posted: Sun Apr 10, 2011 5:35 pm
by slembcke
Hmm? The pivot joint is in the joints video. (I assume you mean this one: http://www.youtube.com/watch?v=ZgJJZTS0 ... r_embedded) It's the third joint shown in the video.

Re: Help Building Body -- Can't Get Joints Working how I Want

Posted: Tue Apr 12, 2011 1:48 pm
by mjvotaw
._.

I need sleep. And maybe some medication. And possibly a reading tutor.