Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can Curve Spline be used for an in game level editor.
#31
(05-08-2023, 10:35 AM)_Aka_ Wrote:
(05-08-2023, 10:16 AM)_Aka_ Wrote: I was able to reproduce the issue. Working on it.

Fixed it. Replace the code of SplineInputModuleBase.ValidateStartAndEndCps with the following:

Code:
        protected void ValidateStartAndEndCps()
        {
            if (InputSpline == null)
                return;
            if (InputSpline.IsInitialized == false)
                return;

            if (m_StartCP && m_StartCP.Spline != InputSpline)
            {
                DTLog.LogError(
                    string.Format(
                        CultureInfo.InvariantCulture,
                        "[Curvy] Input module {0}: StartCP is not part of the input spline ({1})",
                        name,
                        InputSpline.name
                    ),
                    this
                );
                m_StartCP = null;
            }

            if (m_EndCP && m_EndCP.Spline != InputSpline)
            {
                DTLog.LogError(
                    string.Format(
                        CultureInfo.InvariantCulture,
                        "[Curvy] Input module {0}: EndCP is not part of the input spline ({1})",
                        name,
                        InputSpline.name
                    ),
                    this
                );
                m_EndCP = null;
            }

            if (m_EndCP != null
                && m_StartCP != null
                && InputSpline.GetControlPointIndex(m_EndCP) <= InputSpline.GetControlPointIndex(m_StartCP))
            {
                DTLog.LogError(
                    string.Format(
                        CultureInfo.InvariantCulture,
                        "[Curvy] Input module {0}: EndCP has an index ({1}) less or equal than StartCP ({2})",
                        name,
                        InputSpline.GetControlPointIndex(m_EndCP),
                        InputSpline.GetControlPointIndex(m_StartCP)
                    ),
                    this
                );
                m_EndCP = null;
            }
        }

Sorry for the inconvenience due to this bug. The fix will be available in the next update.

Fix released in 8.7.0
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Available for freelance work—feel free to reach out.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Morph game object along curve. mikechr2000 5 324 02-04-2025, 09:30 PM
Last Post: _Aka_
  Disable a spline's gizmo when not selected or disabled. mikechr2000 1 139 02-03-2025, 09:34 AM
Last Post: _Aka_
Information Questions regarding spline colliders and collisions with rigidbodies Spyboticer 7 509 01-20-2025, 12:25 PM
Last Post: _Aka_
  Scaling a closed curve rickgplus 1 184 01-16-2025, 06:52 PM
Last Post: _Aka_

Forum Jump: