Page 1 of 1

Strange error

Posted: Wed Apr 11, 2018 11:53 am
by Pesegato
Hi,
I've encountered a strange behavior on my test application:
I add 2 square moving bodies to the BroadphaseDetector, and then run a listener to check for collisions.
If the bodies are already overlapping when the application starts, the collision is correctly detected (as long as the body are overlapping).
If the body start separated and then collide, no collision is ever detected.

Code (can be run with gradle), also include visual debug:

https://github.com/Pesegato/MonkeySheet ... eD4J2.java

Where I add the bodies:

https://github.com/Pesegato/MonkeySheet ... va#L44-L57

I've added a convenient flag for showing or hiding the bug:

https://github.com/Pesegato/MonkeySheet ... 2.java#L26

Thanks!

Re: Strange error

Posted: Thu Apr 12, 2018 9:39 am
by Pesegato
Solved, forgot to call

bp.update(body)


:lol: :lol: :lol: