{{description>Discover Curvy Splines, a top Unity spline tool. Find the nearest point on a spline with ease using our advanced methods & events.}} {{indexmenu_n>1}} ======Nearest Spline Point====== Given a [[documentation:splines:curvyspline]] and an [[documentation:components:nearestsplinepoint#source_position|Input Position]], this class will provide you with the nearest point to that position on the given spline. The nearest point is output via two ways: * Setting the position of the [[documentation:components:nearestsplinepoint#target_position|Target Position]] parameter * Calling the [[documentation:components:nearestsplinepoint#on_updated|On Updated]] event This component simply calls the [[https://api.curvyeditor.com/FluffyUnderware.Curvy.CurvySpline.html#FluffyUnderware_Curvy_CurvySpline_GetNearestPoint_UnityEngine_Vector3_UnityEngine_Space_|GetNearestPoint]] method from the CurvySpline class. If you are a programmer, you can simply call the method directly. ==Spline== The [[documentation:splines:curvyspline]] on which the nearest position is searched for ==Source Position== A transform which position will be used as the input position for the search ==Target Position== A transform which position will be updated with the nearest point on [[documentation:components:nearestsplinepoint#spline|Spline]] to [[documentation:components:nearestsplinepoint#source_position|Source Position]] ==Update In== When to run the search ==On Updated== At each update, this event is called with the result of the search