I am working on a Bubble Shooter type game where I want a body not to collide with any thing else when its burst or falling down. I cant use collision filtering because all the bodies on the scene are of same type. I want to disable the collision. I don't want to collide a body with any other body.Some one told me to set the isSensor flag to true but again I am not able to get the flag and set it. Please help.
Found the answer:
for(int i=0; i<getBody().getFixtureList().size();i++){
this.getBody().getFixtureList().get(i).setSensor(true);
}
Setting the sensor to true will cause no collisions effects for a body. But remember actually collisions are occurring and contact listeners are called. But collision effect due to physics is not happening so you need to check that if the body has isSesors set to true do nothing in contact listeners.