Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Setup Ignore Collisions between Body and Motor Colliders?
#3
(30-04-2024, 10:26 AM)josemendez Wrote: Hi,

Not sure what you mean by Obi "layer"?


For controlling collisions, Obi uses a filter-based system that allows you to assign a specific category to both colliders and particles, and a mask that determines which categories it is allowed to collide against. You can find this explained in the Collisions page:
http://obi.virtualmethodstudio.com/manua...#filtering

So for your use case you can set up a character's body colliders on a specific category, and set the character's softbody to collide with all categories except its own. This will allow you to have up to 16 characters per solver (as there's 16 available categories). In case you need more than 16 categories, you can dynamically reassign them based on distance between their transforms.

Note there's no equivalent to Physics.IgnoreCollision in Obi, as this information would need to be stored per-particle and the amount of memory required would skyrocket. The advantage of a category/mask based system is that it can be efficiently stored using only 4 bytes per particle (2 for the category, 2 for the mask) and it's also really fast to test (just a bitwise "and").

kind regards,

Yes, I mean Obi "layer" is this mask filtering system.
So dynamically setting filter and mask? I still not wrap my head around this fully.

For example: 
character A: the soft bodies must be setup dynamically so that it will Not contact with its own motor (set to category 2).
character B becomes the nearest character to A: it also set Not contact with its motor, for example set to category 3, just a random number from 2-15 so that it is different than 2 (motor of A) because it wants to contact with character A.
This dynamically set "contact with" and motor category logic will execute every time character A detect another character that become the new nearest character? This sound very complicated haha.
Reply


Messages In This Thread
RE: Setup Ignore Collisions between Body and Motor Colliders? - by spikebor - 30-04-2024, 11:55 AM