Transform.InverseTransformPoint - oblique line

I´m making a game with lines and i use Transform.InverseTransformPoint so now if the collison is on the left/right or up/down the line.
The question is that it does not work fine is the line is oblique.
How can i solve this?

Here is the trigger code:

function OnTriggerEnter2D(other:Collider2D) {
if(other.gameObject.name=="player")
{
if(Input.GetMouseButton(0))
{
entrance_positon=transform.InverseTransformPoint(other.transform.position);
if(entrance_position.y>0) //it does not work well with x axes
{
....do something
}
}
}
}

So, it works for only the middle two “T” lines? Huh.

I’d recheck the axis’s and print out entrance_position. For example, in a flat game, y is always zero, so checking y>0 should do nothing. Is this “standing up” on the xy plane, up is always negative Z?

Even so, for localPosition, z is forward, and x is right, same as for global. Of course, it’s your Right, so depends on spin. But just checking the numbers should show you that.