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
#2
Hi
Can you please try this https://forum.curvyeditor.com/thread-112...ml#pid4081 and let me know if it fixed it?
Thanks
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Question IndexOutOfRangeException in CurvySplineSegment.LocalFToDistance function mchangxe 13 1,201 05-06-2021, 12:56 PM
Last Post: _Aka_
  IndexOutOfRangeException In InterpolateFast UsernameHed 7 4,084 09-06-2019, 09:44 PM
Last Post: _Aka_
  CurvySplineSegment info in inspector. __v__ 1 2,274 09-21-2018, 12:00 AM
Last Post: _Aka_

Forum Jump: