Reputation: 148
Sometimes libgdx detects two collisions when there should be actually one. I figured it out by printing messages from contact listeners methods. Bouncing is not even noticeable when you look at the screen but contact listener detects it. I tried to set restitution field of Fixture object to 0 but it didn't help.
Is there any way to prevent it?
Upvotes: 1
Views: 301
Reputation: 8262
Unfortunately, no.
You could try adding another fixture that is a little bit larger than the existing fixture, and make it a sensor fixture. You could use that in your contact listener instead of the solid fixture.
Upvotes: 4