- Home /
How do I detect collision from single attached collider only.
I'm trying to do a platformer character controller, I have square collider and circular one below it. Circular one is meant to detect when player is standing on ground.
How can I detect events from only circular collider, not all attached to the game object?
Answer by NeverHopeless · Jun 19, 2015 at 04:12 AM
You may try like:
GetComponent<CircleCollider2D>() == Physics2D.OverlapPoint(yourCameraConvertedPoint);
I assume this line is written in a script which is attached to the gameObject having 2 colliders.
Answer by Eiyon · Jun 19, 2015 at 03:57 AM
add Rigidbody2D to your circle Collider and also enable Is Kinematic. I don't know how you wrote your Scripts, but you need to create a different script for your ground.
Your answer
![](https://koobas.hobune.stream/wayback/20220613201116im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Disable click action when collision 1 Answer
Collider2D.GetContacts(List() contacts) works with OnColliderEnter2D but not with OnTriggerEnter2D 1 Answer
OnTriggerEnter2D and ladder won't be compatible 2 Answers
Edge Collider issue 1 Answer
How do I set an object's velocity to the velocity of an object that collided with it? 0 Answers