Exemple #1
0
        /// <summary>
        ///     Got positions of all path nodes.
        /// </summary>
        /// <param name="nodesNo">
        ///     Number of nodes to return. If not specified, all nodes will be
        ///     returned.
        /// </param>
        /// <returns></returns>
        public List <Vector3> GetNodePositions(int nodesNo = -1)
        {
            // Specify number of nodes to return.
            var returnNodesNo = nodesNo > -1 ? nodesNo : NodesNo;
            // Create empty result array.
            var result = new List <Vector3>();

            // Fill in array with node positions.
            for (var i = 0; i < returnNodesNo; i++)
            {
                // Get node 3d position.
                result.Add(AnimatedObjectPath.GetVectorAtKey(i));
            }

            return(result);
        }
Exemple #2
0
 public Vector3 GetNodePosition(int nodeIndex)
 {
     return(AnimatedObjectPath.GetVectorAtKey(nodeIndex));
 }