Update SplinePlus.cs

This commit is contained in:
Josh4359 2023-09-18 16:02:21 -07:00
parent 5fba9784c2
commit 319d55d80b

View File

@ -24,7 +24,7 @@ namespace FrameJosh.SplineImporter
public void Evaluate(float anchor, float distance, out Vector3 position, out Quaternion rotation)
{
float t = anchor + (distance / splineContainer.Spline.GetLength());
float t = anchor + (distance / splineContainer.CalculateLength());
if (deformContainer)
DeformSpline(t, out position, out rotation);
@ -228,5 +228,10 @@ namespace FrameJosh.SplineImporter
}
}
}
void Reset()
{
splineContainer = GetComponentInChildren<SplineContainer>();
}
}
}