Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Rope not colliding with other ObiColliders
#2
You need to setup collision filter masks in both the rope and each of your colliders. By default (when creating Obi actors from script), they're all set to zero so nothing colliders.

ObiUtils has a static MakeFilter function for that. Let's say you want your ropes to be in category 0 and your colliders in category 1, then you'd do this:
Code:
obiRope.filter = ObiUtils.MakeFilter((1 << 0) | (1 << 1), 0); // put rope in category 0 and make it collide with categories 0 (ropes) and 1 (colliders)
obiCollider.filter = ObiUtils.MakeFilter(1 << 0, 1); // put collider in category 1 and make it collide with category 0 (ropes)

This really seems to be missing in the docs, I had to dig through Obi's code myself to find this. It should be added here: http://obi.virtualmethodstudio.com/manua...ctors.html
Also, note that the term "filter" seems to be new. The online version of the API is still at version 6.0 and there it's still called "phases" or so, that also needs updating for sure.
Reply


Messages In This Thread
RE: Rope not colliding with other ObiColliders - by pdinklag - 08-01-2022, 01:15 PM