Trigger Collider detection

Does OnTriggerStay fire when a collider is within their mesh or only when they intersect?

Has nothing to do with meshes. It’s fired when 2 colliders are touching in any way. Try using a Debug.Log() to check for yourself.

I tested my question. Triggers do detect colliders fully within their bounds, not just ones that intersect with the surface, but they ONLY trigger the trigger methods if the other collider moves. Also It doesn’t count if the trigger itself moves.

Is there a way to detect colliders within a square, but doesn’t require them to have moved first?

To give more context:
I created a 6 sided mesh in the shape of a cone.
The cone would be used to detect the closest enemy to the player. Then when the player fires, the bullet will travel in the direction of the enemy.

The Situation:
I can currently detect enemies, but only if they are moving. If they are not moving the trigger will not detect them.

the problem:
If an enemy is not moving AutoAim will not function on them.

Hit is for first contact, stay is for duration of contact (and intersection), and exit is when there is no longer any contact.

It may be worth mentioning that at least one of the colliders needs a rigid body.

Yep, they enemies are all set up correctly. The issue is that the trigger methods won’t fire unless the enemy character moves. So I can sweep the trigger over the enemy all I want and it won’t detect it. However, if I switch the enemies action AI from NONE to PATROL, the trigger will detect the enemy perfectly.

Is there a way to get a list of colliders or gameobjects within a mesh? Something like a sphere cast but only objects within a Collider.

Has anyone done any RTS group selection that might be able to give me a few tips? The concept is very similar.

Ahh I see now. The problem was that the trigger had no rigidbody.
Because of this it wouldn’t detect static colliders.

See the matrix box that lists the hit combinations on this page.