I’m having a problem with getting a trigger event to work. I’m trying to get it so that when an enemy object collides with an object with the tag “Player” that it destroys the object. Except the event is only being triggered when the player object is falling down while it is in the air.
I made sure that the player object is a non kinematic rigidbody and the enemy object is set up as a trigger but I don’t know if there is a problem with the objects or with the code itself.
Here is the code I’m using for enemy behavior:
function OnTriggerEnter( other : Collider)
if (other.tag == "Player")