private void DrawOneLine(GameObject spawnedA, GameObject spawnedB) { Vector3 point = Vector3.zero; Vector3 direction = Vector3.zero; bool success = Math3DUtils.planePlaneIntersection(out point, out direction, spawnedA, spawnedB); if (success) { DebugDrawLineVect(point, direction, 0.5f, Color.red, 10f); InstLine(point, direction, Color.yellow); } }
// Draw a lines private GameObject DrawCornerLine(Vector3 point, GameObject s0, GameObject s1, GameObject s2) { Vector3 point0; Vector3 dir0; bool success0 = Math3DUtils.planePlaneIntersection(out point0, out dir0, s0, s1); if (success0) { Vector3 dir0fixed = FixPositiveNegative(dir0, s2); return(InstLine(point + dir0fixed / 2, dir0, Color.yellow)); } return(null); }