예제 #1
0
        public bool Calc(float t, out Vector3 pos, out Vector3 tan, out Vector3 up)
        {
            pos = Vector3.zero;
            tan = Vector3.forward;
            up  = Vector3.up;

            ISpline sp = Spline;

            if (sp == null)
            {
                Dbg.LogErr("BaseSplineBehaviour.Calc: not set spline yet");
                return(false);
            }

            Dbg.Assert(0 <= t && t <= 1, "BaseSplineBehaviour.GetUp: t beyond range: {0}", t);

            sp.Calc(t, out pos, out tan, out up);
            return(true);
        }