Obi Official Forum
Help Collision Info - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Rope (https://obi.virtualmethodstudio.com/forum/forum-4.html)
+--- Thread: Help Collision Info (/thread-2540.html)



Collision Info - KyleJohnOConnor - 16-10-2020

Good day!

I'm trying to detect when a box collider on a certain layer has a collision with Obi Rope.
I've been trying to implement the Collision callback featured here, implementing this as a mono behavior on the same game object that has the ObiSolver.
Sadly I don't understand where the reference to ObiCollisionWorld comes from. Is there something I'm missing?


RE: Collision Info - josemendez - 16-10-2020

(16-10-2020, 08:06 AM)KyleJohnOConnor Wrote: Good day!

I'm trying to detect when a box collider on a certain layer has a collision with Obi Rope.
I've been trying to implement the Collision callback featured here, implementing this as a mono behavior on the same game object that has the ObiSolver.
Sadly I don't understand where the reference to ObiCollisionWorld comes from. Is there something I'm missing?


Hi there,

Quote:var world = ObiColliderWorld.GetInstance();

GetInstance() a static method that returns the only existing instance of the collider world. This is called a singleton pattern, and is widely used in programming (though there's a years-long heated debate over it, some consider it evil, some think it has its uses in certain circumstances, I'm in the second group).

cheers,


RE: Collision Info - KyleJohnOConnor - 16-10-2020

(16-10-2020, 09:42 AM)josemendez Wrote: Hi there,


GetInstance() a static method that returns the only existing instance of the collider world. This is called a singleton pattern, and is widely used in programming (though there's a years-long heated debate over it, some consider it evil, some think it has its uses in certain circumstances, I'm in the second group).

cheers,

Hello! Thank you so much for the feed back.
It turns out I am actually using a an older version that uses the 3.x implementation!
Thanks!