# PCG, Get index of points on the spline and loop them for pathfinding through them

**URL:** <https://forums.unrealengine.com/t/pcg-get-index-of-points-on-the-spline-and-loop-them-for-pathfinding-through-them/2560121>\
**Category:** Programming & Scripting\
**Tags:** spline-point, unreal-engine, question\
**Created:** [June 16, 2025, 11:21am UTC](https://forums.unrealengine.com/t/pcg-get-index-of-points-on-the-spline-and-loop-them-for-pathfinding-through-them/2560121 "2025-06-16T11:21:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![IL\_Link](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@IL\_Link](https://forums.unrealengine.com/u/IL_Link)\
**Post date:** [June 16, 2025, 11:21am UTC](https://forums.unrealengine.com/t/pcg-get-index-of-points-on-the-spline-and-loop-them-for-pathfinding-through-them/2560121/1 "2025-06-16T11:21:34Z")

</div>

Hi, I want to create a PCG spline system to sample my spline, get the controls point (ora point along the spline, that’s not a problem) then I want to take the index of these points to create a pathfinding.  
Basically I would have a pathfinding for each couple of point index from the spline.  
I think this would involve using PCG loop o loopFeedback but unfortunately i didn’t find the correct way.  
In the image the current system where i can get the first and the second point, but they are hard coded so not procedural for each point.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/0/d/b0d14038b7077f8e320251e6fbde4881183cb0c4.png)

These points feed a pcg loop for the pathfinding, but i don’t think it’s the right way.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/d/1/dd18f0405fb65c2e8e1d06ff156a3a7d9c0728cf.png)

**I might have taken the wrong approach, because using pathfinding for each pair ends up giving me a broken spline at the connection points. What I’d like is for the pathfinding to use my spline as a guideline and then do its job: how can I achieve this?**
