Coin Magnet Collider Overlap
I am trying to make a coin magnet in my game. I have a Magnet Gameobject
which is the child of Character. Magnet object has Circle collider
which is isTrigger. I wrote a script for Coins. When coin hits the Magnet's collider, it moves to Magnet with OnTriggerStay
method. I used Vector3.MoveTowards method to move the coin towards magnet. My Character script increases the coin amount and destroys the coin in its OnTriggerEnter
method. Problem is: half of the coins not trigger the Character's OnTriggerEnter
method. I think their colliders overlap on each other. I checked other posts but they weren't helpful.
How can I solve this overlap problem?
Your answer
Follow this Question
Related Questions
OnTriggerEnter2D() function not working 1 Answer
OnTriggerEnter2D not working 2 Answers
How to make a growing mesh 0 Answers
OnTriggerEnter2D Not Detecting BoxCollider2D - Childed Object 2 Answers
My knockback script is not working 0 Answers