Need some help with Joints

Official forum for the Chipmunk2D Physics Library.
tatebn
Posts: 41
Joined: Tue May 12, 2009 1:03 pm
Contact:

Re: Need some help with Joints

Post by tatebn »

I tried to post this earlier, but it's not showing up. So I apologize if this is a double post.

Is it relative to the body center or the body origin?
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Need some help with Joints

Post by slembcke »

Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
tatebn
Posts: 41
Joined: Tue May 12, 2009 1:03 pm
Contact:

Re: Need some help with Joints

Post by tatebn »

I understand they are relative to the body. But are they relative to the center of the body or are they relative to the origin of the body? As in to have the anchors on the bottom, middle of the shape would it be something like anchor = cpv(0, -40) * 40 being half the height of the shape.
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Need some help with Joints

Post by slembcke »

If by center, you mean the center of where all the shapes are attached to, Chipmunk doesn't track that sort of thing at all. If by center you mean center of gravity, then that IS the origin of the body's space.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
tatebn
Posts: 41
Joined: Tue May 12, 2009 1:03 pm
Contact:

Re: Need some help with Joints

Post by tatebn »

By center I mean, if the shape is a sqaure 100 pixels by 100 pixels than the anchor for the top would be cpv(0, 50). The x being 0 because it's the center, and the y being 50 because it's half the height of the square above the center.
tatebn
Posts: 41
Joined: Tue May 12, 2009 1:03 pm
Contact:

Re: Need some help with Joints

Post by tatebn »

Would it be possible for me to send you a video of the application and the problems I'm having. It would probably give you a better idea of what's wrong. I'd prefer to email or pm it if that's ok.

Thanks
tatebn
Posts: 41
Joined: Tue May 12, 2009 1:03 pm
Contact:

Re: Need some help with Joints

Post by tatebn »

So is that a no? I'm just guessing if you could see what it's doing it would be a lot easier for you to let me know what's going on.

Thanks
Brandon
Post Reply

Who is online

Users browsing this forum: Heise IT-Markt [Crawler] and 11 guests