Misunderstanding on EvaluateBezier ?! please help

from documentation :
EvaluateBezier → " Generates a list of sample points on a Bezier curve defined by 2 points."

the first parameter to be passed is ControlPoints , an “Array of 4 FVectors (vert1, controlpoint1, controlpoint2, vert2).”
so I expected to have to pass an array of Fvector , but the declaration for this parameter is “const FVector * ControlPoints” , therefore a pointer to only one Fvector (I think) .

inside the evaluateBezier function, ControlPoints is treated with ControlPoints[0],ControlPoints[1] …and so on .

so, how I should declare (and use) the variable to be passed ?

thanks for your help .

When you pass in an array, you are really just passing around a pointer to the first element of that array. It’s a bit confusing if you don’t understand how arrays work under the hood in C++, but you’re on the right track.

You should be able to just declare, populate, and pass in your array like so:

FVector MyControlPoints[4]; 

// Fill out your control points.

TArray<FVector> OutPoints;
EvaluateBezier(MyControlPoints, 2, OutPoints);

perfect, thank you so much !