InverseTransformDirection code example
Example: InverseTransformDirection
void Start()
{
// transform the world forward into local space:
Vector3 relative;
relative = transform.InverseTransformDirection(Vector3.forward);
Debug.Log(relative);
}