示例#1
0
        public override float Length()
        {
            Vector3 lossyScale = LocalSpaceTransform.lossyScale;

            if (lossyScale == Vector3.zero)
                return 0f;

            if (Mathf.Approximately(lossyScale.x, lossyScale.y))
            {
                Circle pathAsWorldCircle = new Circle(LocalCircle.Center, LocalCircle.Radius * lossyScale.x);
                return pathAsWorldCircle.Length() * Mathf.Abs(MaxAngle / Circle.TwoPI);
            }
            else
                return BruteLength();
        }
示例#2
0
 public CirclePath(Transform localSpace, Circle localCircle, float maxAngle = Circle.TwoPI)
     : this(localSpace)
 {
     LocalCircle = localCircle;
     MaxAngle = maxAngle;
 }