August 2018
Beginner
334 pages
10h 19m
English
This is a long recipe that could be regarded as a big two-step process. First, we build the Path class, which abstracts points in the path from their specific spatial representations, and then we build the PathFollower behavior that makes use of that abstraction in order to get actual spatial points to follow:
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class Path : MonoBehaviour
{
public List<GameObject> nodes;
List<PathSegment> segments;
}
void Start()
{
segments = GetSegments();
}
Read now
Unlock full access