Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
edited title
Link
doppelgreener
  • 7.3k
  • 7
  • 43
  • 69

How detect collision between two bodies? (Box2D on LibGDX )

Source Link

How detect collision between two bodies? (Box2D on LibGDX )

I'm using LibGDX with Box2D and I've two bodies. I just need to know that they have collided.

So, I just need a boolean output.

Example:

if (bodyA.collision(bodyB) == true) {
   // Do something
}

How can I do this?

If it is too complicated, can I detect if two PolygonShape intersect?