- Home /
how to know sender of triggerenter event?
I would need to know the sender of a triggerenter event. I mean the collider which fired it. I know it is quite easy to script this, but now I need it for debugging. I have two monsters with the same setup and one of them does fire these triggerenter events but the other does not. I would like to know why the first one fires the event, because it should not be fired as far as I know. Could anyone help me please?
Comment
Answer by Zacker · Jan 04, 2012 at 12:17 PM
void OnTriggerEnter(Collider other) {
Debug.Log(other.gameObject.name);
}
Your answer
Follow this Question
Related Questions
create event on collision 2 Answers
How would I detect a right click with an event trigger? 3 Answers
Animation playing other object animation 0 Answers
How to use the deselect Event Trigger? 1 Answer
How do I trigger an event (health loss) only once? 3 Answers