Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Setup Ignore Collisions between Body and Motor Colliders?
#2
(30-04-2024, 10:00 AM)spikebor Wrote: The reason I can't use Obi layer to do this

Hi,

Not sure what you mean by Obi "layer"?

(30-04-2024, 10:00 AM)spikebor Wrote: I want all characters no matter friends or foes can consider moving on top of any other characters, so Motor can interact with other character's body colliders, but not interact with its owner's body colliders. Do Obi have this method? I've looked into the Collision page and does not see any mention.

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,
Reply


Messages In This Thread
RE: Setup Ignore Collisions between Body and Motor Colliders? - by josemendez - 30-04-2024, 10:26 AM