10-17-2022, 10:07 AM
Hi
In the CurvyInterpolatableMetadataBase class, you have access to the ControlPoint property. Using it, you can do the conversion you talked about in the Interpolate method's implementation. An example with the example script E01_HeightMetadata:
Did this help?
Have a nice day
In the CurvyInterpolatableMetadataBase class, you have access to the ControlPoint property. Using it, you can do the conversion you talked about in the Interpolate method's implementation. An example with the example script E01_HeightMetadata:
Code:
public override float Interpolate(CurvyInterpolatableMetadataBase<float> nextMetadata, float interpolationTime)
{
if (nextMetadata != null)
return Mathf.Lerp(MetaDataValue,
nextMetadata.MetaDataValue,
ControlPoint.LocalFToDistance(interpolationTime) / ControlPoint.Length);
return MetaDataValue;
}
Did this help?
Have a nice day
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.