You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Box2D and its derivative have a preSolve event that is fired when two colliders or sensors are about to get into contact, giving the user code the possibility to cancel the contact. This is for example useful in two cases:
for platforms that can be climbed from the bottom, but are solid in the top, as in Super Mario,
when one of the object is supposed to be destroyed by the user logic when it touches the other, before the collision occurs.
As far as I've read in the documentation, Rapier currently only provides post world step events.
If proximity events Proximity::WithinMargin would be fired for collider-collider interactions, possibly these could be used for hacking around this limitation, but as the documentation says, due to the speed of movement they might be skipped, so that does not seem like a solution.
The text was updated successfully, but these errors were encountered:
Yes, this sounds like something we will want to add. Maybe we could even make it more flexible and allow other kinds of effects like modifying the contact normal, friction coefficients, etc. right before the solver takes them into account.
I wouldn't say this is a duplicate of #3 because #3 would filter pairs out before contacts are actually computed. With what you propose here, contacts would be computed as usual, but the way these contacts are handled by the solver can be modified by the user. I think this can actually be seen as a superset of #25.
ryo33
pushed a commit
to ryo33/rapier
that referenced
this issue
Nov 15, 2020
Box2D and its derivative have a
preSolve
event that is fired when two colliders or sensors are about to get into contact, giving the user code the possibility to cancel the contact. This is for example useful in two cases:As far as I've read in the documentation, Rapier currently only provides post world step events.
If proximity events
Proximity::WithinMargin
would be fired for collider-collider interactions, possibly these could be used for hacking around this limitation, but as the documentation says, due to the speed of movement they might be skipped, so that does not seem like a solution.The text was updated successfully, but these errors were encountered: