Sensor contact points (the exact coordinates) got removed at some point. I just came across a situation where they would be very handy: I'm trying to generate visual waves for a buoyant region based on a sensor. Is there any easy way to turn them on / hack them back in?
Case for Sensor Contact Points: Buoyancy Waves
Bugs, Requests, and FeedbackLook at b2Contact::Evaluate.
Awesome, that works for begin contact. Is there a way to get the last contact point during the end contact callback though? Does b2Contact::localPoint mean anything at this point (I've always been confused about that property)? It is unfortunately very inefficient to to use pre and post solve in my environment. I suppose I could use b2Distance if all else fails.
When BeginContact is called, you can keep a copy of the contact pointer until EndContact is called. Use that pointer as you wish to evaluate the contact manifold. You have to use b2WorldManifold to get contact points in world coordinates. Make sure you nullify your copy of the pointer when EndContact is called.
Original thread: https://box2d.org/forum/viewtopic.php?t=5097