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?
Need some help with Joints
-
- Posts: 41
- Joined: Tue May 12, 2009 1:03 pm
- Contact:
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: Need some help with Joints
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
-
- Posts: 41
- Joined: Tue May 12, 2009 1:03 pm
- Contact:
Re: Need some help with Joints
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.
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: Need some help with Joints
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/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
-
- Posts: 41
- Joined: Tue May 12, 2009 1:03 pm
- Contact:
Re: Need some help with Joints
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.
-
- Posts: 41
- Joined: Tue May 12, 2009 1:03 pm
- Contact:
Re: Need some help with Joints
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
Thanks
-
- Posts: 41
- Joined: Tue May 12, 2009 1:03 pm
- Contact:
Re: Need some help with Joints
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
Thanks
Brandon
Who is online
Users browsing this forum: No registered users and 6 guests