Hi there everyone!
I’m hitting myself against a wall right now, i’m trying to create an algorythm that takes an array of points and divide the resulting path in segments of equal lenght (getting the cutting point as a result). For now i have a the vector, the total lenght measured, and the numer of points i get if i want the lenght of each segment to be X.
Obviously the problem here is how to measure in situations like this.

I thinks this is more like a math problem, but i’m not finding a lot of help searching the internet about any system to actually achieve this.
I do not want a 100% perfect division, i dont care if the segments deviate a little bit as long as it is not much.
Thank you for your help and attetion people!!
PS: If you feel brave, the B part of this problem is to do this with two separated paths and treat them like one, like use the total lenght of both of them even if they do not connect.
So, let’s look at red dot D. When you go to find point E, your first step should be checking the distance from point D to the next corner. If this is <1m, you know you’ll have to round the corner. More importantly, by calculating that distance, you know exactly how far you have to round that corner.
If x = dist(D, corner), then dist(corner, E) = 1 - x. You can enforce the latter with Vector3.MoveTowards, with 1 - x as the distance parameter. From there you can continue to point F as normal.
That’s about as detailed an answer as I can give without seeing the code for your existing attempt.
Okay, that was my original idea, but i wasn’t sure if it was a GOOD idea
I’ll give it a try and tell/show afterwards, thanks 
It being a good idea is relative to what you need.
If you need to conserve the information about the corner, it’s a bad idea.
But you already said that you don’t care if it deveats from the path a little bit… so it’s fits your needs. Making it a good idea.
Of course the size of the segment (1m in this case) will effect this though. And you can always do the division, run it on several paths, and make sure they look like what you consider acceptable.
A few weeks late, but I just happen to have the same problem a couple months ago and made a PathToSteps conversion function that might do what you want. I use it place one meter spaced footprints and action-point markers along the path created from a NavAgent.
public static List<Vector3> PathAsSteps(Vector3[] path, float stepLength) {
List<Vector3> steps = new List<Vector3>();
if (stepLength <= 0) {
throw new ArgumentException("stepLength must be > 0");
}
Vector3 p0 = path[0];
steps.Add(p0);
int s = 1;
while (s < path.Length) {
// work on path segment of p0 to p1
Vector3 p1 = path[s];
float segmentLength = Vector3.Magnitude(p1 - p0);
// bite off a stepSize (eg 1 meter) piece of the segment to get the next step
if (segmentLength >= stepLength) {
p0 = Vector3.MoveTowards(p0, p1, stepLength);
steps.Add(p0);
} else {
float carryover = stepLength - segmentLength;
p0 = p1;
s++;
if (s < path.Length) {
p1 = path[s];
p0 = Vector3.MoveTowards(p0, p1, carryover);
steps.Add(p0);
}
}
}
return steps;
}