06-27-2015, 06:10 PM
I am trying to use Curvy Connections for track switching in a Train Game, However it seems buggy. First when my connections join an existing track all my Spline Walkers (Train + Cars) immediately jump onto the destination spline, instead of walking on 1 by 1.
Also when I back up on to the Parent Spline I get a StackOverflow error:
StackOverflowException
UnityEngine.Object.CompareBaseObjects (UnityEngine.Object lhs, UnityEngine.Object rhs)
UnityEngine.Object.Equals (System.Object o)
System.Collections.Generic.EqualityComparer`1+DefaultComparer[CurvySplineSegment].Equals (.CurvySplineSegment x, .CurvySplineSegment y) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/EqualityComparer.cs:84)
System.Array.IndexOf[CurvySplineSegment] (.CurvySplineSegment array, .CurvySplineSegment value, Int32 startIndex, Int32 count) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System/Array.cs:2132)
System.Collections.Generic.List`1[CurvySplineSegment].Contains (.CurvySplineSegment item) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/List.cs:176)
CurvyConnection.Validate () (at Assets/Curvy/Base/CurvyConnection.cs:125)
CurvySplineSegment.get_Connection () (at Assets/Curvy/Base/CurvySplineSegment.cs:399)
CurvySplineSegment.GetAllConnections (Int32 minMatchesNeeded, System.String tags) (at Assets/Curvy/Base/CurvySplineSegment.cs:641)
CurvySpline.GetConnectionsWithin (Single tf, Int32 direction, Single fDistance, Int32 minMatchesNeeded, Boolean skipCurrent, System.String tags) (at Assets/Curvy/Base/CurvySpline.cs:583)
CurvySpline.MoveConnection (.CurvySpline& spline, System.Single& tf, System.Int32& direction, Single fDistance, CurvyClamping clamping, Int32 minMatchesNeeded, System.String tags) (at Assets/Curvy/Base/CurvySpline.cs:601)
CurvySpline.MoveConnection (.CurvySpline& spline, System.Single& tf, System.Int32& direction, Single fDistance, CurvyClamping clamping, Int32 minMatchesNeeded, System.String tags) (at Assets/Curvy/Base/CurvySpline.cs:614)
CurvySpline.MoveConnection (.CurvySpline& spline, System.Single& tf, System.Int32& direction, Single fDistance, CurvyClamping clamping, Int32 minMatchesNeeded, System.String tags) (at Assets/Curvy/Base/CurvySpline.cs:614)
CurvySpline.MoveConnection (.CurvySpline& spline, System.Single& tf, System.Int32& direction, Single fDistance, CurvyClamping clamping, Int32 minMatchesNeeded, System.String tags) (at Assets/Curvy/Base/CurvySpline.cs:614)
CurvySpline.MoveConnection (.CurvySpline& spline, System.Single& tf, System.Int32& direction, Single fDistance, CurvyClamping clamping, Int32 minMatchesNeeded, System.String tags) (at Assets/Curvy/Base/CurvySpline.cs:614)
CurvySpline.MoveConnection (.CurvySpline& spline, System.Single& tf, System.Int32& direction, Single fDistance, CurvyClamping clamping, Int32 minMatchesNeeded, System.String tags) (at Assets/Curvy/Base/CurvySpline.cs:614)
CurvySpline.MoveConnection (.CurvySpline& spline, System.Single& tf, System.Int32& direction, Single fDistance, CurvyClamping clamping, Int32 minMatchesNeeded, System.String tags) (at Assets/Curvy/Base/CurvySpline.cs:614)
It just keeps going,
Please help
Also when I back up on to the Parent Spline I get a StackOverflow error:
StackOverflowException
UnityEngine.Object.CompareBaseObjects (UnityEngine.Object lhs, UnityEngine.Object rhs)
UnityEngine.Object.Equals (System.Object o)
System.Collections.Generic.EqualityComparer`1+DefaultComparer[CurvySplineSegment].Equals (.CurvySplineSegment x, .CurvySplineSegment y) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/EqualityComparer.cs:84)
System.Array.IndexOf[CurvySplineSegment] (.CurvySplineSegment array, .CurvySplineSegment value, Int32 startIndex, Int32 count) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System/Array.cs:2132)
System.Collections.Generic.List`1[CurvySplineSegment].Contains (.CurvySplineSegment item) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/List.cs:176)
CurvyConnection.Validate () (at Assets/Curvy/Base/CurvyConnection.cs:125)
CurvySplineSegment.get_Connection () (at Assets/Curvy/Base/CurvySplineSegment.cs:399)
CurvySplineSegment.GetAllConnections (Int32 minMatchesNeeded, System.String tags) (at Assets/Curvy/Base/CurvySplineSegment.cs:641)
CurvySpline.GetConnectionsWithin (Single tf, Int32 direction, Single fDistance, Int32 minMatchesNeeded, Boolean skipCurrent, System.String tags) (at Assets/Curvy/Base/CurvySpline.cs:583)
CurvySpline.MoveConnection (.CurvySpline& spline, System.Single& tf, System.Int32& direction, Single fDistance, CurvyClamping clamping, Int32 minMatchesNeeded, System.String tags) (at Assets/Curvy/Base/CurvySpline.cs:601)
CurvySpline.MoveConnection (.CurvySpline& spline, System.Single& tf, System.Int32& direction, Single fDistance, CurvyClamping clamping, Int32 minMatchesNeeded, System.String tags) (at Assets/Curvy/Base/CurvySpline.cs:614)
CurvySpline.MoveConnection (.CurvySpline& spline, System.Single& tf, System.Int32& direction, Single fDistance, CurvyClamping clamping, Int32 minMatchesNeeded, System.String tags) (at Assets/Curvy/Base/CurvySpline.cs:614)
CurvySpline.MoveConnection (.CurvySpline& spline, System.Single& tf, System.Int32& direction, Single fDistance, CurvyClamping clamping, Int32 minMatchesNeeded, System.String tags) (at Assets/Curvy/Base/CurvySpline.cs:614)
CurvySpline.MoveConnection (.CurvySpline& spline, System.Single& tf, System.Int32& direction, Single fDistance, CurvyClamping clamping, Int32 minMatchesNeeded, System.String tags) (at Assets/Curvy/Base/CurvySpline.cs:614)
CurvySpline.MoveConnection (.CurvySpline& spline, System.Single& tf, System.Int32& direction, Single fDistance, CurvyClamping clamping, Int32 minMatchesNeeded, System.String tags) (at Assets/Curvy/Base/CurvySpline.cs:614)
CurvySpline.MoveConnection (.CurvySpline& spline, System.Single& tf, System.Int32& direction, Single fDistance, CurvyClamping clamping, Int32 minMatchesNeeded, System.String tags) (at Assets/Curvy/Base/CurvySpline.cs:614)
It just keeps going,
Please help