Center of Collision

Hi there,
I’m using OnTriggerEnter function to detect collision enter between my player and other oject on the map.

OnTriggerEnter works as soon as some edge of my player touches the edge of object’s collision, but i need it to trigger only if the player is in the center of the object.
I tried making the collision box it self very tiny like a stick, but it didn’t fix the problem.

Here is picture of what i mean:
alt text

I need the player(blue ball) to trigger only once the center of my player touches the red X which is the center of the collision box.

Is there any way to do so? ;D
Thanks.

I’m not sure how much the image helps without understanding what we’re seeing. I assume you don’t mention the other triangular shape because it doesn’t matter?

The basic request is clear enough though. A collision is synonymous with the word overlap. If two colliders overlap and the physics matrix allows them to interact, collision/trigger events are raised.

There are any number of ways to get what you want here. Perhaps the simplest would involve measuring the distance between the player origin and the target origin during OnTriggerStay(). If the gap is very small, you’ve reached the x.