trying to draw arrows like http://wiki.unity3d.com/index.php?title=DrawArrow
it mostly works… it is just that some of the arrows (only right above or below?) are not oriented so as to be visible
how can i ‘flatten’/rotate them so they are visible like the others?
please & thanks
private void ArrowGizmo(Vector2 child, Vector2 parent, Color c)
{
const float length = .05f;
const float angle = 20f;
Gizmos.color = c;
Vector2 d = (parent - child) * .5f;
Gizmos.DrawRay(child, d);
Vector3 right = Quaternion.LookRotation(d) * Quaternion.Euler(180 + angle, 0f, 0f) * Vector3.forward;
Vector3 left = Quaternion.LookRotation(d) * Quaternion.Euler(180 - angle, 0f, 0f) * Vector3.forward;
Gizmos.DrawRay(child + d, right * length);
Gizmos.DrawRay(child + d, left * length);
}