I have a bomb in my 2D game that you can pick move around, put down and if in the right spot(s) will blow up certain “breakable” items, all that’s working.
Just now I set a staticbox2d collision in the middle of the bomb so my character couldn’t just walk through the item, to give it some importance, but, I still want the monsters (enemy) to be able to go through it. Now, is this possible to do it easily? I don’t want to have to go through layers/masks or any of that because I don’t really understand that. If it not easy I can live with it as is.
You will have to set separate collision layers/masks. Put your Floor/World, Player, Bomb, and Enemies on different layers; 1, 2, 3, and 4. It would be best to set layer names for them in the project settings.
Have your player mask the Floor/World, Bomb, and Enemies; 1, 3, and 4
The Enemies will mask only Floor/World, maybe players too; 1 and 2
Static bodies usually do not need to mask anything to function.
The enemy has a raycast and when it hit the explosive/bomb it turns it around to go the other way whereas I want it to go through it. I only want the explosive to stop the player