Hi Folks,
I use mouse to change an Object A’s position on the screen with OnDragStart, OnDrag, OnDragEnd functions and want to know whether it is intersected with Object B. Here is my code…
void OnTriggerEnter2D(Collider2D other){
Debug.Log("trigger enter ");
}
void OnTriggerStay2D(Collider2D other){
Debug.Log("trigger stay ");
}
void OnTriggerExit2D(Collider2D other){
Debug.Log("trigger exit ");
}
but the weird thing is only OnTriggerEnter2D and OnTriggerStay2D are called, not InTriggerExit2D. It seems others also have the same issue but i couldn’t find a clear answer. Anyone here can help? Thx in advance.