This project has moved and is read-only. For the latest updates, please go here.

Vertices.CreateSimpleRectangle Bug?

Jul 5, 2009 at 12:21 AM

Hi all,

I'm creating two bodies and colliding them; they are both rectanglular. I'm using the SAT narrow phase collision method; if I use Vertices.CreateSimpleRectangle to create my rectangle geom I get the following undesirable behaviour:

I've tried switching broad phase collider, just in case that was causing the problem, but that makes no difference. The problem goes away if I use CreateRectangle instead, however.

For now, I'm just going to use CreateRectangle(), but I thought I'd mention this in case it's a problem nested in the SAT collider.


Thanks :)

Jul 5, 2009 at 12:39 AM

looks like simple rectangle has contact points only at corners.. that after fall barely missed corner point of falling object..  if you would have wider base rectangle, it would work fine.. i guess.

Jul 5, 2009 at 1:00 AM

Thanks for reporting this bug.

If CreateRectangle() works for you, that's great. The SAT narrow phase collider grows in linear computing time with the number of polygons and SAT only needs the polygons that actually makes up the geometry/shape. So performance only suffers a little with more polygons.

Would you be able to send the demo to me? I'll contact you with my email, you can reply with the source.

Jul 5, 2009 at 1:01 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.