public Vector3 LEFT(object[] args)
{
Vector3 outValue = Vector3.zero;
if (args [0] is GameObject) { // left of an object
GameObject obj = ((GameObject)args [0]);
Bounds bounds = new Bounds ();
bounds = Helper.GetObjectWorldSize (obj);
GameObject camera = GameObject.Find ("Main Camera");
float povDir = cameraRelativeDirections ? camera.transform.eulerAngles.y : 0.0f;
Vector3 rayStart = new Vector3 (0.0f, 0.0f,
Mathf.Abs(bounds.size.z));
rayStart = Quaternion.Euler (0.0f, povDir+270.0f, 0.0f) * rayStart;
rayStart += obj.transform.position;
outValue = Helper.RayIntersectionPoint (rayStart, obj);
Debug.Log ("left: " + Helper.VectorToParsable (outValue));
}
else if (args [0] is Vector3) { // left of a location
outValue = (Vector3)args[0];
}
return outValue;
}