Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Switch Spline Problem
#1
If it has reached the end of the spline, I want it to move to the next spline. I want to do this through code. It switches from spline 1 to spline 2 but does not complete spline 2. and it doesn't switch to the 3rd spline. How can I do it?


My SplineController Code:

public void GoNextSpline()
        {
            SwitchTo(splineTest, 1, 1); 
            IsAtEnd = false;
        }


public void OnEndReachedMethod()
        {
            IsAtEnd = true;
        }



My Other Code:

public CurvySpline myPreviousSpline;
    public CurvySpline myEnterSpline;
    public CurvySpline myExitSpline;
public SplineController splineController;

void Update()
    {
if (splineController.Spline == previousSpline && splineController.IsAtEnd)
                splineController.GoNextSpline();

        if (splineController.Spline == enterSpline && splineController.IsAtEnd)
            splineController.GoNextSpline();

        if (splineController.Spline == exitSpline && splineController.IsAtEnd)
            splineController.GoNextSpline();
}
Reply


Messages In This Thread
Switch Spline Problem - by erenjeagerot - 05-29-2023, 03:16 PM
RE: Switch Spline Problem - by _Aka_ - 05-29-2023, 07:26 PM
RE: Switch Spline Problem - by erenjeagerot - 05-30-2023, 05:29 AM
RE: Switch Spline Problem - by erenjeagerot - 05-30-2023, 09:09 AM
RE: Switch Spline Problem - by _Aka_ - 05-30-2023, 10:49 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Best way to duplicate a spline with an offset Kapistijn 8 1,414 04-12-2026, 03:18 PM
Last Post: _Aka_
Smile Constant speed along a spline? tfishell 1 663 11-13-2025, 11:32 AM
Last Post: _Aka_
  SplineController Ignores Follow-Up and Chooses Wrong Spline Josenildo 7 4,470 07-29-2025, 09:15 PM
Last Post: _Aka_
  Curvy Line Renderer for UI Spline? gekido 7 6,256 07-13-2025, 07:11 PM
Last Post: _Aka_

Forum Jump: