Hi Box2d friends,
maybe there is an easy solution to the following problem: I want to check bodies in my world for if they overlap, but i don't want them to collide, i.e. i want two balls to continue flying as they were, but i wnat to see if their shapes overlap.
I figured ot that that collisions between different objects can be turned on and off selectively using maskBits and categoryBits, but as Ive seen it, if they are not set up for collision, there is no overlap checking as well (which normally does make sense as regards performance). But I have certain Areas in my JumpNRun game (water for example) that i would like to see if the player is in.
Right now i am using a rather awkward way of using the b2Collision class directly and calling the appropriate checking function for each pair of shapes (checking all shapes of all bodies with all shapes of all bodies 🙂). This technique becomes rather slow if there are a lot of areas to be checked and I noticed that box2ds normal collision detection is A LOT faster.
So I guess I am doing something wrong...
Andi
maybe there is an easy solution to the following problem: I want to check bodies in my world for if they overlap, but i don't want them to collide, i.e. i want two balls to continue flying as they were, but i wnat to see if their shapes overlap.
I figured ot that that collisions between different objects can be turned on and off selectively using maskBits and categoryBits, but as Ive seen it, if they are not set up for collision, there is no overlap checking as well (which normally does make sense as regards performance). But I have certain Areas in my JumpNRun game (water for example) that i would like to see if the player is in.
Right now i am using a rather awkward way of using the b2Collision class directly and calling the appropriate checking function for each pair of shapes (checking all shapes of all bodies with all shapes of all bodies 🙂). This technique becomes rather slow if there are a lot of areas to be checked and I noticed that box2ds normal collision detection is A LOT faster.
So I guess I am doing something wrong...
Andi