Quote:
The minimum shape radius must be bigger than b2_toiSlop or you will get an assertion when the core shape is computed.
Ok, that's why I'm not seeing it happen now - I'm still using one of the earlier 2.0 prototypes, I guess before you added that check. Just so I make sure I'm checking the same way, do you remember off the top of your head which file that check appears in?
Quote:
For the case you mentioned, you should just eliminate the middle vertex. Can't you just detect the shallow angle and eliminate the vertex?
Right, and that's what I've been doing, but as allanon noted, the first problem there is that a very shallow triangle is eliminated altogether - this can probably just be seen as a limitation of the engine, so these should just be removed (there's no way to force simulation of a shape that can't simulate properly). The real problem is that in a decomposition, if one of the decomposed polygons has a very shallow angle, removing the vertex (cutting off a triangle) ends up leaving a small, thin hole, usually touching an external vertex. Which things can get stuck in...
Ah, which brings up another issue - it doesn't look like CCD quite solves the issue where things get stuck in the "seams" of compound objects (probably because while the true geometry actually encloses the interior, the core shapes leave gaps). I could attempt to mitigate this by double covering the seams (if possible), but I'm not sure if that's going to cause problems of its own with the physics - any suggestions?
For the moment, I'm going to shoot for merely getting the output of this thing to provide valid input for Box2d in as many cases as possible, at the cost of potentially leaving out bits of the original geometry. I'll upload a new version in a couple days (I should also have the edge tracing working better by then, too) and let's see how it works in practice. If there are serious problems, we can figure out what to do from there.
Oh, also, is anyone that's planning on using this still using 1.4.3, or have you all moved on to the 2.0 prototype? I'm probably going to make the switch to that pretty soon, which means a few things will have to change - let me know if you would like me to keep the 1.4.3 code in there with a preprocessor conditional or something like that, otherwise I'll excise it pretty soon.