Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using Curvy for a "Ghost" player
#5
Code:
ghostSpline.transform.GetChild(ghostSpline.transform.childCount - 2).GetComponent<CurvySplineSegment>()
is equivalent to
Code:
ghostSpline[ghostSpline.Count - 1]
which is equivalent to
Code:
ghostSpline.Segments[ghostSpline.Count - 1]

And to avoid you confusion, when you say:
"One thing I realized is that the length needs to be grabbed from the previous spline because it's the length going forward (thus the last spline has a length of 0)."
What you speak about are not splines, but control points:
A spline has (except special cases) N control points, and N-1 segments. Each segment is the spline's chunk between two control points. Spline.ControlPointsList gives you the list of control points, and Spline.Segments gives you the list of segments. Both of them are instances of CurvySplineSegment classes
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Messages In This Thread
Using Curvy for a "Ghost" player - by mythstified - 04-08-2019, 04:38 AM
RE: Using Curvy for a "Ghost" player - by _Aka_ - 04-08-2019, 12:38 PM
RE: Using Curvy for a "Ghost" player - by _Aka_ - 04-08-2019, 12:40 PM
RE: Using Curvy for a "Ghost" player - by _Aka_ - 04-09-2019, 11:02 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_
  8.8.0 is live, and it improves Curvy Generator greatly _Aka_ 1 10 04-03-2024, 03:16 PM
Last Post: _Aka_
  snap to the curve created by the curvy splines segment points ShiroeYamamoto 3 11 04-02-2024, 02:24 PM
Last Post: _Aka_
Exclamation Extending Curvy Generator for Advanced Lofting - Feasibility Check amutp 2 5 03-27-2024, 07:25 AM
Last Post: amutp

Forum Jump: