Alternative To Collision Layers

It’s been suggested a few times that Flowlab should get some kind of option to have multiple layers of collisions / physics, so that there can be collision between certain sets of objects and not between others.
I would like to propose an alternative to the Layers idea: a simple checkbox in the object physics menu that reads, “Only Check Collisions In Behaviors”.
Enabling this checkbox would mean that instead of checking for collisions with every other collidable object every frame, this object only checks for collisions with the objects that have been added in a Collision behavior in the Behaviors editor. In other words, only objects listed in the Behavior editor using the Collision behavior would affect this object’s physics and be collidablle with it.
I believe this would be a little more practical than trying to implement some kind of collision layering system, and as well I think it would be much better performance-wise, as would literally just make Flowlab’s physics engine do fewer collision checks.
I din’t know if I’ve explained this very well but I’d love any questions or comments about it.

7 Likes

It seems like you could easily do this by disabling collisions with the enabler.

1 Like

The enable block turns collisions all the way off or on…
When an object’s collisions are enabled, it can collide with every other existing collidable object.
When an object’s collisions are disabled, it can’t collide with any other objects.
What I’m proposing would allow an object to be collidable only with certain other collidable objects but not others, e.g. object 1 could be set as collidable only with object 2 but not objects 3, 4, or 5, while object 3 might be set as only collidable with objects 4 and 5, but not with 1 or 2.
Does that make more sense?

1 Like

Yes, but you didn’t have to explain all of this since me and other people have already brought this up.

1 Like

I think your proposal is good; I’m proposing this as an alternative that would be more workable within Flowlab’s current physics system.

1 Like