Suggestions for improving the contact callback system

Hangar wrote:
Shapecasts: Do they exist in any form yet? Will the new broadphase support them? If so, is there a simple (if inefficient) way I could calculate them in the meantime?


You can use b2TimeOfImpact to do shape casts.

Hangar wrote:
Character Movement: Previously you said you'd always use a custom solver to calculate character movement. Do you have any advice on where to hook this sort of information? Should I step the world and then move stuff around based on a character ghost shape? Should I do anything during the step?


My approach would be to collect all the collision planes using shape casts and try to solve all the constraints simultaneously. You can do this with repeated plane projections.
By collision planes, do you mean the depth and direction of penetration at each contact point? Here's what I'm thinking.

Code:
Step normal physics
Find all the contacts around the character
Try to move the character to the spot with the least (usually 0) penetration.
Figure out a reference frame for the character (up vector)
Figure out a displacement for the character the frame (including gravity)
Break it into horizontal and vertical components
Trace up by some maximum step height + vertical component if positive
Bounce forward as far as possible (up to horizontal component)
Trace down and attempt to reach ground, descending any slopes that are too steep to have climbed



Edit: Fixed the biped test. Patch attached. (Apply to Tests dir directly.)

Edit2: Ran into a problem: I need memory allocation, but the block allocator is a private member. Should I just use new?

Original thread: https://box2d.org/forum/viewtopic.php?t=1784