Esempio n. 1
0
        public static void GetOffsetFromPathSegment(Path path, float curvePos, out Vector3 up, out Vector3 left)
        {
            quaternion direction = CatmullRom.DirectionToRotationWorldUp(path.GetTangent(curvePos));

            up   = math.mul(direction, new float3(0, 1, 0)) * (path.height / 2.0f);
            left = math.mul(direction, new float3(1, 0, 0)) * (path.width / 2.0f);
        }