Update DebugRaycaster.cs

This commit is contained in:
Nick 2022-06-19 12:00:02 -04:00
parent 2183c28669
commit 979c09b1b5

View File

@ -113,7 +113,7 @@ namespace NewHorizons.Utility.DebugUtilities
if (Vector3.Cross(U, N) == Vector3.zero) U = new Vector3(0, 0, 1);
if (Vector3.Cross(U, N) == Vector3.zero) U = new Vector3(0, 1, 0); // if 0,0,1 was actually the same vector U already was (lol), try (0,1,0) instead
Logger.Log("U is " + U.ToString());
Logger.Log("Up vector is " + U.ToString());
// stackoverflow.com/a/9605695
// I don't know exactly how this works, but I'm projecting a point that is located above the plane's origin, relative to the planet, onto the plane. this gets us our v vector