Confused about modifier priorities

I want to run a smooth modifier on a path but only after creating the vector3 list since I want to reference the raw vector3 list and use the smoothed vector3 list plus a line renderer just for cosmetic purposes.

I understand smoothing changes the vector3 list but since Modifier Priorities have been removed, I don’t know where in the process I need to do this.

public void Start()
{
    seeker.StartPath(start.transform.position, end.transform.position, OnPathComplete);
}

public void OnPathComplete(Path p)
{
    if (p.error){
        Debug.Log("error");
    }
    else{
        List<Vector3> path = p.vectorPath;
    }
}

Hi

The original vector path is not saved after it has been post-processed. However you can re-create it since it’s just the positions of the nodes in the path.

public void OnPathComplete(Path p)
{
    var rawVectorPath = p.nodes.Select(node => (Vector3)node.position).ToList();
}

“Path does not contain a definition for nodes”. I also tried p.pathhandler.nodes but it does not contain “Select”. Are you maybe referencing old code, or new code I don’t have yet? I’m on version 4.2.15.

Sorry. I meant p.path.Select...

No, that’s not it either. I could iterate through a for loop but this just seems like a syntax issue.

1 Like