Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IndexOutOfRangeException in CurvySplineSegment.LocalFToDistance
#1
I'm getting this error when I try to use the LocalFToDistance method on a spline of roughly 20 units length with certain cache settings, it mostly goes away if I adjust those cache settings but if I pass a TF very close to 1 (i.e. 0.9994 in my last debug test) I get an off by 1 in the index and it errors.

My hacky fix has been to round to 0/1 if my TF very close to either, but I'd like to avoid the hacks if possible!

Code:
 
IndexOutOfRangeException: Index was outside the bounds of the array.
  at FluffyUnderware.Curvy.CurvySplineSegment.LocalFToDistance (System.Single localF) [0x00046] in W:\TestProj\Assets\Plugins\Curvy\Base\CurvySplineSegment.cs:1397
  at FluffyUnderware.Curvy.CurvySpline.TFToDistance (System.Single tf, FluffyUnderware.Curvy.CurvyClamping clamping) [0x0004f] in W:\TestProj\Assets\Plugins\Curvy\Base\CurvySpline.cs:1262
Reply


Messages In This Thread
IndexOutOfRangeException in CurvySplineSegment.LocalFToDistance - by billowe - 05-11-2021, 05:29 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Errors in Built Application in CurvySplineSegment TdayMFG 7 3,817 04-13-2025, 09:24 AM
Last Post: _Aka_
  Disabling a CurvySplineSegment results in NullRefException Lupos 1 1,617 10-02-2023, 09:55 AM
Last Post: _Aka_
  Custom CurvySplineSegment prefabs Lupos 1 1,666 10-02-2023, 09:36 AM
Last Post: _Aka_
Brick Delete CurvySplineSegment from the start of a Spline causes UV's to change studentloan 5 3,428 06-14-2022, 03:14 PM
Last Post: _Aka_

Forum Jump: