When an object is moving with a certain velocity and then hits a stationary object, the object position obviously cannot be inside of the stationary object that it hit. Is there a way to find out where the position would have been after the tick if the stationary object was not there in the ContactListener?
Question
General DiscussionThis is a hard problem to solve exactly because other objects may be involved. If you just want an approximate answer, you can cache the initial position and velocity and integrate the forces yourself.
Erin Catto wrote:
This is a hard problem to solve exactly because other objects may be involved. If you just want an approximate answer, you can cache the initial position and velocity and integrate the forces yourself.
Or he could use GJK/EPA to find the closest points on the polygons.
Example:
http://code.google.com/p/gjkd/
Original thread: https://box2d.org/forum/viewtopic.php?t=3142