public static void DrawBoneOutline(Vector3 position, Vector3 endPoint, float radius, float outlineSize, Color color) { Handles.color = color; HandlesExtra.DrawLine(position, endPoint, Vector3.back, 2f * (radius + outlineSize), 2f * outlineSize); HandlesExtra.DrawCircle(position, radius + outlineSize); HandlesExtra.DrawCircle(position, outlineSize); }
public static void DrawBoneBody(Vector3 position, Vector3 childPosition, float radius, Color color) { Vector3 distance = position - childPosition; if (distance.magnitude > radius) { HandlesExtra.DrawLine(position, childPosition, Vector3.back, 2f * radius, 0f, color); } }
public static void DrawBoneBody(Vector3 position, Vector3 endPosition, float radius, Color color) { Vector3 distance = position - endPosition; if (distance.magnitude > radius && color.a > 0f) { HandlesExtra.DrawLine(position, endPosition, Vector3.back, 2f * radius, 0f, color); HandlesExtra.DrawSolidArc(position, Vector3.back, Vector3.Cross(endPosition - position, Vector3.forward), 180f, radius, color); } }
public static void DrawBoneOutline(Vector3 position, Vector3 endPoint, float radius, float outlineSize, Color color) { Handles.color = color; HandlesExtra.DrawLine(position, endPoint, Vector3.back, 2f * (radius + outlineSize), 2f * outlineSize); HandlesExtra.DrawSolidArc(position, Vector3.forward, Vector3.Cross(endPoint - position, Vector3.back), 180f, radius + outlineSize, color); if (outlineSize > 0f) { HandlesExtra.DrawSolidArc(endPoint, Vector3.back, Vector3.Cross(endPoint - position, Vector3.back), 180f, outlineSize, color); } }