Hi, I’ve been trying to port the most recent code of Box2D over to my
Physics2D.Net Engine and I am having some problems.
I have basically ported the b2ContactSolver class and kept the rest of my code the same. (I’m starting small)
The first problem I have come across is how I represent immovable platforms. I currently set the Body’s Mass to Positive Infinity and has worked until now. The problem is with the b2ContactSolver::SolvePositionConstraints method. It does some math that results with NAN being added to the Body’s position. Naturally this is not a desired behavior. I have tried to do some changes but they either result with bodies slowly sinking into the immovable platforms or them jumping around like popcorn.
Basically I’m wondering if someone could give a few pointers on how to resolve this problem. Also how does Box2D represent immovable platforms?