Example #1
0
        public static void RenderDistance(Matrix4x4 transformation, Vector3 from, Vector3 to)
        {
            var distance = from - to;

            if (distance.sqrMagnitude == 0)
            {
                return;
            }

            using (new SceneHandles.DrawingScope(transformation))
            {
                SceneHandles.DrawLine(from, to);
                SceneHandles.RenderBorderedDot(from, UnityEditor.HandleUtility.GetHandleSize(from) * HandleRendering.kPointScale);
                SceneHandles.RenderBorderedDot(to, UnityEditor.HandleUtility.GetHandleSize(to) * HandleRendering.kPointScale);
            }
        }