Collision Position

Hey all. How do I ask Unity whether a collision was below my object? I’m guessing something to do with contact points, which I’m not entirely sure how to use.

Thanks. :slight_smile:

If you’re using the character controller, you can use collisionFlags. Every time you move your character using controller.Move(), you can check those flags to see if it’s hitting something and from what direction. There’s an example in the link I added.

If you’re speaking about something more general, you can use collision contacts.
It’s a little bit more trickier since Unity doesn’t do all the work for you. You are the one who needs to check where the hit accured.
You do, however receive an array with contact points and normals, so it should be pretty simple to check if those points are bellow or above the center of your object, or some other reference point on your object…