Dynamic segment shapes

Official forum for the Chipmunk2D Physics Library.

Dynamic segment shapes

Postby yzsolt » Sat Jan 26, 2013 2:24 pm

Hello slembcke,

I saw that segment-to-segment collision detection have been implemented. I've ported it to my Chipmunk JS port, but it hasn't worked as I expected. My first thought was that it would have to make possible to create and simulate dynamic "pill" shapes (segments with radius), but I was wrong as I see. I've created a dynamic body with a segment shape and it has moved around very unrealistic... :D
I came to the conclusion that it's not a bug, rather a missing (or never-wanted-to-implement) feature of segment shapes (their center of mass and related calculations) causes it. My first question is, am I right? And the second: will it be ever implemented, or not - because a polygon and two circle shapes on a body can act like a segment shape with a radius?
Posts: 2
Joined: Thu Apr 12, 2012 1:25 pm

Re: Dynamic segment shapes

Postby slembcke » Mon Jan 28, 2013 6:22 pm

Strangely related to this thread started at nearly the same time:

Proper segment-segment collisions are coming with the GJK port, but it's not ready yet. Unfortunately I don't really have an ETA for it either. (See above)

Though the segment-segment collision code that exists now should work pretty well though. It will report some weird contact points for deeply overlapping segments though. What exactly was the issue you were having?
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
Site Admin
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

Re: Dynamic segment shapes

Postby yzsolt » Tue Jan 29, 2013 1:22 pm

If they would have to work well, then I will revise the ported code again... In my physics sandbox dynamic segment shapes collide perfectly, but they can rotate only counter-clockwise, and produce strange movement.
I think there's a pretty little mistake I made while porting...
Posts: 2
Joined: Thu Apr 12, 2012 1:25 pm

Return to Chipmunk2D Physics

Who is online

Users browsing this forum: No registered users and 1 guest