20-05-2021, 08:31 PM
(20-05-2021, 08:23 PM)josemendez Wrote: Just finished implementing mask-based collision filtering, which completely replaces phases.
Now each particle (and each collider) has an additional 32 bit integer associated to it. The 16 less significant bits are used to place the particle in one of 16 possible “categories”. The 16 most significant bits are a mask that let you specify which categories should the particle collide against.
So you can specify a “Category” value (0-15) and a “Collides with” mask, for each particle in an actor, and for each collider.
The phase value is now repurposed as a unique “actor id”. Particles with the same actor id (that is, belonging to the same actor) collide with each other only if the actor has self-collisions enabled. Otherwise, the category/mask is used.
- By default, everything collides with everything else. No need to manually bump phase values for each actor to collide with other actors.
- Works for cases that weren’t possible before. You can have actor A collide with collider A’, and actor B collide with collider B’, but B wont collide with A’ and A won’t collide with B’.
- Self collisions are actual self collisions, not collisions with things in the same phase.
This is scheduled for release in Obi 6.2, around a month from now.
Wow, that's a big change. I appreciate the rapid response to feedback (even if this was already a planned change)!