Hi,
I’m trying to make a spline camera and I’m trying to find the closest point on the spline to the player. I believe I’d need to know what kind of spline (Catmul Rom, Bezier, etc…) it is before I can do that.
Thanks!
I did some research and it seems that the spline components are Catmull-Rom splines. If someone can confirm that would be cool.
Yeah some documentation and examples would be nice.
Cubic Hermite spline.
FInterpCurve class has method InaccurateFindNearest
Look on InterpCurve.h
/**
* Find the nearest point on spline to the given point.
*
* @param PointInSpace - the given point
* @param OutDistanceSq - output - the squared distance between the given point and the closest found point.
* @return The key (the 't' parameter) of the nearest point.
*/
float InaccurateFindNearest( const T &PointInSpace, float& OutDistanceSq ) const;