OnTriggerEnter2D() is never being called
I am doing an experiment trying to use a Collider2D (specifically a Collider Circle 2D) component on my game objects in a 2D game for simple collision detection. Wanting to see if this is faster than doing my own logic.
Right out of the gate, though, I am surprised that thus far I have not been able to get any collision contacts to fire at all and wondering what obvious thing here I might be missing.
Both GameObjects have a Collider Circle 2D that is enabled and active.
Both colliders are set to Trigger mode
Have a script component on one of the GameObjects that has implemented both OnTriggerStay2D and OnTriggerEnter2D
Have confirmed that both gameobjects have the same Z value (not even sure if a 2d game allows z value to change)
Have paused the game in the editor and its clear that the colliders are definitely overlapping
Also tried adding a RigidBody2D component to both gameobjects after reading some other posts but still never detecting trigger collision.
No OnTriggerStay2d or OnTriggerEnter2D is ever being called even once. What am I missing?
Your answer
Follow this Question
Related Questions
How to make object with velocity bounce off the obstacles? 0 Answers
How To create 2D collision detection on object which changes dimensions 1 Answer
2d collisions physics not working when using mouse as input 0 Answers
Collision is not working with some Collider2d 1 Answer
How can i get a transform to move to another transform if it is touching it? 0 Answers