Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Collision Info
#1
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?
Reply
#2
(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,
Reply
#3
(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!
Reply