Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Metadata interpolation
#2
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:

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 Splines, this helps immensely. Thank you.
Reply


Messages In This Thread
Metadata interpolation - by tairoark - 10-16-2022, 06:09 PM
RE: Metadata interpolation - by _Aka_ - 10-17-2022, 10:07 AM
RE: Metadata interpolation - by tairoark - 10-17-2022, 11:47 AM
RE: Metadata interpolation - by _Aka_ - 10-17-2022, 01:07 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Control Point Interpolation Overrides. rickgplus 1 757 12-11-2025, 08:52 AM
Last Post: _Aka_
  Controler Speed from metadata Bryan Thatcher 4 3,055 06-25-2024, 11:18 AM
Last Post: _Aka_
  "MetaData" Of Entire Spline Heightmap SAMYTHEBIGJUICY 3 2,934 10-16-2023, 08:42 AM
Last Post: _Aka_
  Proper metadata usage tairoark 2 2,136 10-01-2022, 12:04 PM
Last Post: _Aka_

Forum Jump: