I'm blind

This commit is contained in:
Ben C 2022-02-25 20:15:36 -05:00
parent a22ef0f124
commit 7df1c1e476
2 changed files with 1 additions and 12 deletions

View File

@ -33,7 +33,7 @@ namespace NewHorizons.Utility
{
var pos = hitInfo.transform.InverseTransformPoint(hitInfo.point);
var o = hitInfo.transform.gameObject;
Logger.Log($"Raycast hit {{\"x\": {pos.x}, \"y\": {pos.y}, \"z\": {pos.z}}} on [{o.name}] at [{SearchUtilities.GetPath(o)}]");
Logger.Log($"Raycast hit {{\"x\": {pos.x}, \"y\": {pos.y}, \"z\": {pos.z}}} on [{o.name}] at [{SearchUtilities.GetPath(o.transform)}]");
}
_rb.EnableCollisionDetection();
}

View File

@ -172,16 +172,5 @@ namespace NewHorizons.Utility
}
return children;
}
public static string GetPath(GameObject obj)
{
string path = "/" + obj.name;
while (obj.transform.parent != null)
{
obj = obj.transform.parent.gameObject;
path = "/" + obj.name + path;
}
return path;
}
}
}