CTIN 289 - Interactive Snippets Library

Powered by 🌱Roam Garden

OnTriggerStay


This turns out to be a really helpful script that I never even knew about.

Here's an example from Bygones...


// while the object REMAINS in the light, this boolean is set to true
private void OnTriggerStay(Collider other)
    {
        if (other.gameObject.CompareTag("Transform"))
        {
            inLightAndPickedUp = true;
        }
    }