projectsbas.blogg.se

Get distance along spline ue4
Get distance along spline ue4





get distance along spline ue4 get distance along spline ue4

It then determines the input key value and returns it. This value basically encodes two things in one in a way - the integer part selects the two points between which the interpolation happens (0.67f => points 0 and 1) and the fractional part selects the amount of interpolation (.67 => 33% of point 0, 67% of point 1).įindInputKe圜losestToWorldLocation - this function takes a world location and finds the closest point on the selected spline to that location. In the case of our simplest spline, "two-thirds through" would correspond to 0.67f. Why a float? So that you can point at somewhere between the control points and ask what the value there is. My knowledge on this is rusty, but the idea seems to be that the starting point has the value of 0.0f, and is increased by 1.0f (by default) per point, so a minimal spline out of two points goes from 0.0f to 1.0f while one made of 4 points would go from 0.0f to 3.0f, with the intermediate points having the values 1.0f and 2.0f. A spline is generally formed from control points, similar to a Bezier curve. A spline key input is a bit like an index into the spline.







Get distance along spline ue4