My case is that I want different type of instances of a class to either handle collision events or not. So based on a certain property I set the collision event mode such as this:
if(type == constants::CHUNK_TYPE_WORLD) {
body->SetCollisionEventMode(COLLISION_NEVER);
} else {
body->SetCollisionEventMode(COLLISION_ALWAYS);
}
So if the type if a world it should not care about collision events, else it should listen for such.
But the problem that I experience is that whenever I set COLLISION_NEVER mask, it seems to apply for all bodies, not just the one I apply it for.
Are the collision masks applied to the body class and not just the instance?
Edit: It seems like collision events comes in bursts and not at every hit when I do the above if statement. But if I remove the COLLISION_NEVER mask it seems to be applied directly…strange?