- Home /
Unity 2D Collision checking
i have got 2 objects types at scene : players and grounds, i want to check if player collides ground, how can i do that?
Answer by TanselAltinel · May 03, 2018 at 02:28 PM
Please follow the tutorials here: https://unity3d.com/learn/tutorials/s/2d-game-creation
Especially 2D Physics with the following:
2D Physics Overview
Rigidbody 2D
Collider 2D
You need to have colliders on both ground and player, and you can use OnCollisionEnter2D
and OnCollisionExit2D
functions to check whether player collides with the ground or not.
Your answer
![](https://koobas.hobune.stream/wayback/20220612161727im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
OnTriggerEnter2D working, OnColliderEnter2D not working 1 Answer
How do I detect which collider is being collided with? 0 Answers
How to make a little wiggle room for the collision? 1 Answer
Can't detect colliders from Tiled 0 Answers
Have 2 colliders on same trigger (and hit the first to enter) 0 Answers