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
  Disable a spline's gizmo when not selected or disabled. mikechr2000 1 97 02-03-2025, 09:34 AM
Last Post: _Aka_
Photo Volume Spots problem with spacing Bond007 3 131 01-20-2025, 12:27 PM
Last Post: _Aka_
Information Questions regarding spline colliders and collisions with rigidbodies Spyboticer 7 354 01-20-2025, 12:25 PM
Last Post: _Aka_
  Extrude mesh along spline. New and confused user GhostStalker 3 122 01-02-2025, 09:58 AM
Last Post: _Aka_

Forum Jump: