Another line thickness issue

Discuss any Chipmunk bugs here.
Post Reply
maximile
Posts: 157
Joined: Mon Aug 20, 2007 12:53 pm
Location: London, UK
Contact:

Another line thickness issue

Post by maximile »

I think I've found another bug related to line thickness, illustrated in this video: http://www.maximile.net/stuff/linetrouble.mp4

It's similar to this one, but with polygons. Seems like they work perfectly if they hit the line point first, but not if they hit the vertex first.
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Another line thickness issue

Post by slembcke »

Crap. After the other thickness bug you found, I went back and looked at the other collision functions again. Fixed a different issue with thick line to poly collisions. Seems I missed that though. :(

I'll take a look at it soonish. Still scrambling to get iPhone ScribBall finished this week.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Another line thickness issue

Post by slembcke »

Ok. I looked at this a little tonight. It was less of an oversight than I had thought. It will require adding entirely new checks to see if a vertex is colliding with a rounded edge. I hadn't quite thought this out carefully enough. I'll see if I can't get this figured out yet tonight. (still got a few more Babylon 5 episodes to watch on Hulu before going to bed ;) )

Good catch!
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Another line thickness issue

Post by slembcke »

Ok, give the latest trunk a try. The collision detection was detecting the overlap, but there was nothing to add the collision points for corner collisions like that. I added a check for such collision points if no other collision points are found.

While this should be correct, the implementation is pretty simplistic and just considers the endpoint pairs in a certain order. This will produce inaccurate collision points for deep penetrations against segments with a larger radius than length. I'm guessing that this isn't really that common, so I won't worry about it so much for now.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
maximile
Posts: 157
Joined: Mon Aug 20, 2007 12:53 pm
Location: London, UK
Contact:

Re: Another line thickness issue

Post by maximile »

awesome, thanks for looking at that. I'm on a boat right now but I'll try out the latest trunk when I get home.
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests