Default ShouldCollide Method in Box2d Problem

BlitzMax Modules Forums/Brucey's Modules/Default ShouldCollide Method in Box2d Problem

Hi Brucey!

I have found out what causes the problem. It is when shapes overlap - at least when they are first created. I got an 'unhandled memory exception' in the collisionFiltering example by setting the large box's position so that it overlapped the smaller box.

This error never occurs if you don't override the ShouldCollide Method, so somethings going wrong.

Also in the CollisionFiltering example I edited it so that if you press a key then a square box shape appears at the mouse cursor position. If you make this shape appear over an existing shape then the 'unhandled memory exception' error occurs. This is a problem because it seems like the shapes themselves don't have to be overlapping for this error to occur, they just need to be very close - so maybe its the bounding boxes overlapping that causes the problem?

Do you know if there is a way to use the ShouldCollide method so that things behave normally? The filterdata is coming up as not Null.

Thanks Brucey for the help - Rico.