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
  Curvy Line Renderer for UI Spline? gekido 3 6 04-04-2024, 12:56 PM
Last Post: _Aka_
  Get position of all control points for a spline gekido 1 6 03-28-2024, 10:08 PM
Last Post: _Aka_
Bug Changing spline connection in inspector causes splines to revert to defaults lacota 3 6 03-18-2024, 07:55 PM
Last Post: _Aka_
  Connections Problem Juton 3 16 03-06-2024, 10:41 AM
Last Post: _Aka_

Forum Jump: