I’ve been trying to implement a camera path based on control points, but I can’t figure out the syntax to use. Here’s the code as it is so far:
public ArrayList controlPoints;
private int currentCP;
private int nextCP;
void Update ()
{
if (transform == controlPoints[nextCP].transform) {
currentCP = nextCP;
nextCP++;
transform = Vector3.Slerp (controlPoints [currentCP], controlPoints [nextCP], 3);
}
}