Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Infinite loop in FixedDistance mesh generation
#9
I'm just looking into this issue.

Edit: Ok, guess it's solved. Locate and replace CurvySpline.DistanceToSegment() with

Code:
public CurvySplineSegment DistanceToSegment(float distance, out float localDistance)
    {
        distance = Mathf.Clamp(distance,0, Length);
        localDistance = 0;
        CurvySplineSegment seg = mSegments[0];
        if (distance == Length) {
            seg = this[Count - 1];
            localDistance = seg.Distance + seg.Length;
            return seg;
        }
            
        
        while (seg && seg.Distance+seg.Length < distance) {
            seg = NextSegment(seg);
        }
        if (seg == null)
            seg = this[Count - 1];
        localDistance = distance - seg.Distance;
        return seg;
    }

Hopefully that will fix it for all times!

Jake

PS: @Voxelboy: I removed your attached scene, because it contains the full Curvy package. Please be more careful next time! This is a public forum...
Reply


Messages In This Thread

Possibly Related Threads…
Thread Author Replies Views Last Post
  Is there a way to generate UVs along deformed and copied mesh? kubak 1 320 03-18-2026, 08:34 PM
Last Post: _Aka_
  Replace deform mesh on volume spots Kokoriko49 1 2,327 06-09-2025, 06:49 PM
Last Post: _Aka_
  Mesh Generation between two splines vatan 4 3,638 02-14-2025, 07:11 AM
Last Post: vatan
  Create Mesh Node, Make Static Options rickgplus 1 1,834 01-23-2025, 10:12 AM
Last Post: _Aka_

Forum Jump: