Strange error

Posts that don't fit into other categories.
Pesegato
Posts: 17
Joined: Fri Oct 21, 2016 5:29 am

Strange error

Postby Pesegato » Wed Apr 11, 2018 11:53 am

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!

Pesegato
Posts: 17
Joined: Fri Oct 21, 2016 5:29 am

Re: Strange error

Postby Pesegato » Thu Apr 12, 2018 9:39 am

Solved, forgot to call

bp.update(body)


:lol: :lol: :lol:


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 2 guests