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

Official forum for the Chipmunk2D Physics Library.
Post Reply
mjvotaw
Posts: 5
Joined: Sun Apr 10, 2011 10:33 am
Contact:

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

Post 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?
mjvotaw
Posts: 5
Joined: Sun Apr 10, 2011 10:33 am
Contact:

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

Post 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...
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

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

Post 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.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
mjvotaw
Posts: 5
Joined: Sun Apr 10, 2011 10:33 am
Contact:

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

Post by mjvotaw »

._.

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

Who is online

Users browsing this forum: No registered users and 14 guests