예제 #1
0
        Vector3 CalculateForwardDirectionOnCurve(
            int ceilingIndex,
            float normalizedPositionBetweenPoints
            )
        {
            ICurvePoint ceiling = thisCurvePoints[ceilingIndex];
            ICurvePoint floor   = thisCurvePoints[ceilingIndex - 1];

            Vector3 ceilingForward = ceiling.GetPosition() - floor.GetPosition();
            Vector3 floorForward   = floor.GetPosition() - floor.GetPrevPointPosition();

            return(Vector3.Lerp(
                       floorForward,
                       ceilingForward,
                       normalizedPositionBetweenPoints
                       ));
        }
예제 #2
0
        public Vector3 GetLastCurvePointPrevPosition()
        {
            ICurvePoint lastCurvePoint = thisCurvePoints[thisCurvePoints.Length - 1];

            return(lastCurvePoint.GetPrevPointPosition());
        }