0

I'm using andengine to develop my android game and ran into the following problem:

I have some bodies flying around a scene. Since they are flying in random directions, some of these bodies may collide with each other. My question is: Is there a way to make some of these bodies exist on different layers so that two bodies from two different layers will not collide (nor will they interact in any way)? Instead, they will simply fly one passed the other in the same direction as before the collision.

I know this can be done with sprites (as explained here and here) but can the same be done with bodies?

Community
  • 1
  • 1
asherbret
  • 5,439
  • 4
  • 38
  • 58

1 Answers1

0

Turns out the term I was looking for is collision filtering. As explained and demonstrated here, filtering allows you to define which bodies can and cannot collide.

asherbret
  • 5,439
  • 4
  • 38
  • 58