Hey Guys,
I'm failing an assert in b2ContactSolver.cpp, line 96: b2Assert(kNormal > b2_epsilon);
How I get it:
In my game, I have a built in editor. While I'm in the edit mode, I no longer simulate physics, but I can edit the physics world (not sure if that is relevant or not).
In the game I have:
One long static rectangular body
Two boxes ontop of the rectangular body
A character I can move around using keyboard control
While I am in edit mode, I attach a distance joint from one box to the other, then I start playing the game.
I can use my character to push box A (bodyA in the joint) without any problem. It doesn't look like the joint is actually attached at this point as box B doesn't move around when I'm pushing box A. Once I go and try to push around boxB, I get the assert.
I saw another post here: viewtopic.php?f=4&t=3893&p=18914&hilit=kNormal+%3E+b2_epsilon#p18914
...but I dont think this is the issue I'm having.
...
When the assert happens, the variables around it have values of:
kNormal = 1.#QNAN00
bodyA->m_mass = 0.00000000
bodyB->m_mass = 2.8900001
bodyA->m_invMass = 0.00000000
bodyB->m_invMass = 0.34602076
bodyA->m_invI = 0.00000000
bodyB->m_invI = 0.71838206
rnA = 1.#QNAN00
rnB = 1.#QNAN00
ccp->rA = {x=1.#QNAN00 y=1.#QNAN00 }
ccp->rB = {x=1.#QNAN00 y=1.#QNAN00 }
cc->normal = {x=1.#QNAN00 y=1.#QNAN00 }
j = 0
worldManifold[j] = {x=1.#QNAN00 y=1.#QNAN00 }
bodyA->m_sweep.c = {x=1.#QNAN00 y=1.#QNAN00 }
bodyB->m_sweep.c = {x=17.219999 y=-0.86499977 }
...totally guessing, but it looks like all of the nonsense starts because bodyA->m_sweep.c = NaN. I wouldn't be surprised if it's something I've screwed up.
Any advice would be appreciated. Thanks.
I'm failing an assert in b2ContactSolver.cpp, line 96: b2Assert(kNormal > b2_epsilon);
How I get it:
In my game, I have a built in editor. While I'm in the edit mode, I no longer simulate physics, but I can edit the physics world (not sure if that is relevant or not).
In the game I have:
One long static rectangular body
Two boxes ontop of the rectangular body
A character I can move around using keyboard control
While I am in edit mode, I attach a distance joint from one box to the other, then I start playing the game.
I can use my character to push box A (bodyA in the joint) without any problem. It doesn't look like the joint is actually attached at this point as box B doesn't move around when I'm pushing box A. Once I go and try to push around boxB, I get the assert.
I saw another post here: viewtopic.php?f=4&t=3893&p=18914&hilit=kNormal+%3E+b2_epsilon#p18914
...but I dont think this is the issue I'm having.
...
When the assert happens, the variables around it have values of:
kNormal = 1.#QNAN00
bodyA->m_mass = 0.00000000
bodyB->m_mass = 2.8900001
bodyA->m_invMass = 0.00000000
bodyB->m_invMass = 0.34602076
bodyA->m_invI = 0.00000000
bodyB->m_invI = 0.71838206
rnA = 1.#QNAN00
rnB = 1.#QNAN00
ccp->rA = {x=1.#QNAN00 y=1.#QNAN00 }
ccp->rB = {x=1.#QNAN00 y=1.#QNAN00 }
cc->normal = {x=1.#QNAN00 y=1.#QNAN00 }
j = 0
worldManifold[j] = {x=1.#QNAN00 y=1.#QNAN00 }
bodyA->m_sweep.c = {x=1.#QNAN00 y=1.#QNAN00 }
bodyB->m_sweep.c = {x=17.219999 y=-0.86499977 }
...totally guessing, but it looks like all of the nonsense starts because bodyA->m_sweep.c = NaN. I wouldn't be surprised if it's something I've screwed up.
Any advice would be appreciated. Thanks.