OnTriggerStay2D(CollIder2D coll) does not detect a collision if a object is standing still inside of the trigger?

I’m having a problem where if my player is not moving inside a trigger, the OnTriggerStay2D function doesn’t detect a collision.

I’ve googled around for a while but I’ve only seen answers that uses Rigidbody collision detection, which I don’t.

I just use a BoxCollider2D.

Any fixes for this? :slight_smile:

Choose “Never Sleep” from Sleeping Mode in Rigidbody2D, now it will continuously detect a collision.

BoxColliders actually require a Rigidbody in order for events to be triggered, including Trigger colliders. This is because collisions and triggers are physics events, and physics is implemented via the use of Rigidbodies.

You can always use Character Controllers, but those give you less control over things like colliders.