I’m making a 3d game, and there are enemies. When I approach them, I use OnTriggerStay or OnTriggerEnter functions for SendMessage (to get damage and attack). But problem is that collider of enemy is set to trigger, so that a Player passes through the enemy. I want the similar functionality but Player should not pass through enemy.
Anyone knows how to fix that?
Can’t you just switch from triggers to colliders, and use the OnCollisionStay and OnCollisionEnter methods?
Or, what I’ve done in some games: have two colliders (or sets of colliders) on each agent: one is a true physics collider, and the other (usually larger) is a trigger. Then I can do triggery things even before the objects actually touch, and still get proper physics when they do.