Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CurvySpline cannot find its own segments
#3
Jake,

That was exactly the problem, thank you! I've resolved it by adding all the splines into a new Stack object that makes sure they are in order, then on each Update I call the following function:

Code:
    private void connectBlockSplines()
    {
        if(addSplineStack.Count == 0)
            return;

        bool doneAdding = false;
        while(!doneAdding)
        {
            CurvySpline nextSpline = addSplineStack.Peek();
            if(!nextSpline.IsInitialized)
                doneAdding = true;
            else
            {
                movementPathSplineGroup.Add(nextSpline);
                addSplineStack.Pop();

                if(addSplineStack.Count == 0)
                    doneAdding = true;
            }
        }
    }

They get added in order regardless of the order they become initalized in and the debug functions I mentioned before that crapped out now show proper data. 

Thanks again!!
Reply


Messages In This Thread

Possibly Related Threads…
Thread Author Replies Views Last Post
  I have a question about curvySpline haifeng.huang 12 32 07-14-2023, 09:34 AM
Last Post: _Aka_
  "Deadloop in CurvySPline.Refresh" spam Valkymaera 3 11 05-30-2023, 10:56 AM
Last Post: _Aka_
Video Spline Gizmos & Segments Invisible while Drawing ricke 19 51 04-14-2023, 01:41 AM
Last Post: ricke
  Gap between spline mesh segments Beaver_Boy 13 73 10-24-2022, 09:37 AM
Last Post: dromo

Forum Jump: