I’m successfully using a collision filter to manage the physical interactions of my physics objects. However, the objects that don’t collide due to the collision filter still generate collision events. As I have hundreds of physics objects in my app, I’m looking for a way to turn off the collision events to match the collision filter (and conserve memory).
i.e. - no collision = no collision AND no collision event. It would be as if the object.isBodyActive = false but only for other objects not in our object’s maskbits
I currently have objects grouped by “type” and use that as a filter.
if (event.other.type == “friend”) then
– ignore
end
but ignoring the collision event all together would be preferable if that’s even a possibility. I’m not even sure how much memory would be conserved but with so many physics objects in play I’m looking for reductions wherever I can find them.
Thanks,
Jonathan