I currently am generating (using a factory) a certain amount of objects. I want all these objects to be collidable with each other. However if I set the group and mask to the same thing in the collisionobject then it collides with itself and goes off in a random direction.
What would be better for me is that if each object could have its own group and then the mask could be a list of all the groups except that one. I’m not worried about performance here as it is not a large amount of objects (ie within the 16). As I am using a factory this would have to be done in code.
Is this possible? If not, is there any other way of dealing with lots of objects of the same base Game Object type being able to collide with each other?
As there is only going to be eight to ten of these it feels like the simplest solution will be just to have eight to ten Game Objects and not use a factory, but that doesn’t feel like a clean solution. Everything about these objects will be the same, I just want them to collide with each other and not themselves.