user3199693
user3199693

Reputation: 148

Libgdx prevent bouncing

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

Answers (1)

iforce2d
iforce2d

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

Related Questions