andengine polygon body and box2d collision

202 Views Asked by At

I recently changed my bodies from rectangle to polygons and got a weird bug and I can't figure it out why its happening. When my "player" body touch another body - with a negative angle he just stack on it.

My player X velocity is always constant 5

when I'm switching the body back to rectangle it working fine

enter image description here

Does any one fimiliar with this bug? or have any idea what can cause it?

1

There are 1 best solutions below

0
Aviram Fireberger On BEST ANSWER

Found a bug in andengine:

When I put 3 point in the same button line this will cause the bug I write above:

To fix that you need to make sure that on evry line on the poligon there are only 2 points!

Works fine now :)