NormalImpulse is different on Android Release (libgdx)

Hi,
first of all, sry for my School-english, i am not a native Speaker 🙂

I use libGDX and box2D and I found a strange Behavior while Integrating Box2D in my Game (Engine).
I started to implement https://bitbucket.org/dermetfan/libgdx-utils/wiki/Breakable and everything was fine, until i tried the same Game on my Tablet.

If I have a breakable Object in Desktop Version, it behaves like expected. On Android it seemed to be much more breakable then on the Desktop Version.
So I started to check where this behavior comes from. The strange Thing is, that in Debugging Mode the behavior is like in the Desktop Version. Only in release mode it breaks faster.

I logged the NormalImpulse(or the Sum), by implementing a custom ContactListener, which delegates to the BreakableManager.

Code: Select all

public void postSolve(Contact contact, ContactImpulse impulse) {
         float normalImpulse = MathUtils.sum(impulse.getNormalImpulses()), tangentImpulse = Math.abs(MathUtils.sum(impulse.getTangentImpulses()));
         System.out.println("Normal Impulse: " + normalImpulse + " Collision NR" + tempcount++ );
         contactManager.postSolve(contact, impulse);



In the CallBack of my Breakable Object i log more detailed Information (all Components of the normal Impulse), but only if the Body is destroyed.
Look at Collision NR28:

Desktop:

Code: Select all

Normal Impulse: 0.29400003 Collision NR23
Normal Impulse: 0.29400003 Collision NR24
Normal Impulse: 0.29400003 Collision NR25
Normal Impulse: 0.29399997 Collision NR26
Normal Impulse: 0.29400006 Collision NR27
Normal Impulse: 3.79384 Collision NR28
Normal Impulse: 0.29400003 Collision NR29
Normal Impulse: 0.29400003 Collision NR30


Android:

Code: Select all

Normal Impulse: 0.29400003 Collision NR23
Normal Impulse: 0.29400003 Collision NR24
Normal Impulse: 0.29400003 Collision NR25
Normal Impulse: 0.29399997 Collision NR26
Normal Impulse: 0.29400006 Collision NR27
Normal Impulse: 54.596504 Collision NR28
NomalImpulse: 3.79384 n0
NomalImpulse: 50.802666 n1
TangentImpulse: -0.93856573 n0
TangentImpulse: 5.5101436E19 n1
Box strained with NormalImpuse: 54.596504 TangetImpulse: 5.5101436E19
Critical Collision destroying Body 20.0
Normal Impulse: 0.29400003 Collision NR29
Normal Impulse: 0.29400003 Collision NR30


As you can see there is a significantly higher Impulse on Android Release Version (NR28). And the Component of N28 is NormalImpulse n1, which is exactly the differnce. NormalImpulse n0 matches the NormalImpulse on Desktop Version. So now i can ignore n1 part, but i guess something is wrong here?

In Debugging Mode everything is fine, like in Desktop Version.


Any Ideas where this comes from?

Thanks
Nobody an Idea?
Better ask in libGDX Forums?
It looks like you probably are, but just to check, are you using fixed-length time steps?
irresistible force wrote:It looks like you probably are, but just to check, are you using fixed-length time steps?


Yes i do.
Made a Video.

http://youtu.be/P9ObJFNlF_w

Original thread: https://box2d.org/forum/viewtopic.php?t=9711