How can I cast a Ray from the position of the object toward the other way of the X local pivot arrow like i show with the green arrow in the screenshot? I want to use the local pivot point because if i rotate the Tile i want the Ray to rotate too.

I use this code but the results are not what i want
RaycastHit hit;
if (Physics.Raycast(transform.position, -transform.right, out hit, maxRayDis)) {
Debug.DrawLine (transform.position, -transform.right*maxRayDis, Color.green);
}
