Quote:
What if you could update a particular contact? Would you have other stuff in the scene that doesn't need the current contact points? Another solution would be to apply the force in the Add/Persist callback. It is okay to apply forces in these callbacks.
The problem with this is sometimes I need all the contacts points in order to evaluate which one is ideal. For example, when jumping, I want to use the most ground-like contact.
This is the next solution I'm going to try: Put the "m_contactManager.Collide()" call back where it belongs, but put a callback function right after it where I can execute my own code. That way I can handle my ContactPoint-sensitive stuff there before "Solve()" gets its dirty hands on it and repositions stuff, and I'll have all my up-to-date buffered ContactPoints to play with.
With "Collide()" called after "Solve()" I seem to have a problem with projectiles created on top of other objects (like a cannonball created over a cannon and given a high velocity). Depending on the initial velocity of the projectile, sometimes I get that initial overlap contact point, sometimes I don't. Getting that point reported is critical if I want to filter the first contact for overlapping shapes, but let them interact later (once they naturally move apart). If I don't get that first contact point, I'll end up filtering the contact I don't want to filter.
...Yeah, that probably made no sense at all.