- Home /
how to detect Object A entering a collider on object B, using a script on object B.
so, for reasons of streamlining other bits of the code, I would like to have a script that I can put on a game object, and detect entries into its own trigger area. Something like an OnTriggerEnter (Trigger thisTrigger) function, if you'll forgive the pseudocode. Is there a way to do this?
Comment
Answer by Kiwasi · Sep 18, 2014 at 10:14 AM
OnTriggerEnter will work without any modification. On the trigger GameObject the call will have details of the entering collider.
Your answer
![](https://koobas.hobune.stream/wayback/20220613163217im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to design an Archer Board Scoring System 1 Answer
Trigger and Collider Issues 1 Answer
OnTriggerEnter for parent AND child. 1 Answer
onTriggerEnter not working? 2 Answers