Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  [Solved] Find collider in contact.
#1
Dedo arriba 
Hello everyone.

This time I was wondering how to find the collider involved in a collision. I know the solver has events which include a list of all the contacts made in the last step. I was checking the contact documentation and it seems to have an int attribute called "other", which contains the index of whatever it is colliding in that contact.

My question is, how do I convert that index to the actual collider?

I supose there should be something that has a list of all the colliders, but I don't seem to find it. The OniColliderWorld that gets created when you start using this system was a good guess but I didn't saw any property that has them. It looks hard to do as colliders don't need to be inside a solver so it might be harder to keep track of every collider.

Thanks in advance.
Reply
#2
Hi there!

Fortunately it’s quite simple to do Sonrisa See “Retrieving the collider involved in a contact” in the manual page for collision callbacks:

http://obi.virtualmethodstudio.com/tutor...sions.html
Reply
#3
(27-01-2021, 11:52 PM)josemendez Wrote: Hi there!

Fortunately it’s quite simple to do Sonrisa See “Retrieving the collider involved in a contact” in the manual page for collision callbacks:

http://obi.virtualmethodstudio.com/tutor...sions.html
 Oh, I should have missed that part haha. Thanks a lot! Gran sonrisa
Reply