Nearest Spline Point

Given a Curvy Spline and an input position, this class will provide you with the nearest point to that position on the given spline.

The nearest position is provided either in an On Updated event, or as an override of the position of the Target Position parameter

This script simply calls the GetNearestPoint method from the CurvySpline class. If you are a programmer, you don't need to use this component, just call the method directly


The Curvy Spline on which the nearest position is searched for

Source Position

A transform which position will be used as the input position for the lookup

Target Position

A transform which position will be updated with the nearest point on Spline to Source Position

Update In

When to run the lookup

On Updated

At each update, this event is called with the result of the lookup