Obi Official Forum

Full Version: Collide once
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So I have a box collider and it's set to isTrigger= true, and eveytime the rope passes through to it, it will increase your score. It works but sometimes it's getting called twice. I just want it to work like OnTriggerEnter.
(21-09-2020, 07:00 AM)joshuajames1 Wrote: [ -> ]So I have a box collider and it's set to isTrigger= true, and eveytime the rope passes through to it, it will increase your score. It works but sometimes it's getting called twice. I just want it to work like OnTriggerEnter.

Obi provides access to the full contact list every frame. Any further contact processing/filtering is your responsibility.

So, if a particle is inside a collider for say, 10 frames, a contact between a rope particle and the collider will appear in the list for 10 frames. Getting a behavior similar to OnTriggerEnter is trivial though: use a bool value to detect a frame during which a contact between the rope and the collider is present, that wasn't present the previous frame.