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
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
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 7 6,160 07-13-2025, 07:11 PM
Last Post: _Aka_
  Player move with object mcarman 4 2,940 07-29-2024, 06:49 PM
Last Post: mcarman
  Invisible Gizmos In Latest Curvy Splines orrenravid1 1 1,510 06-11-2024, 07:36 AM
Last Post: _Aka_
  8.8.0 is live, and it improves Curvy Generator greatly _Aka_ 1 1,531 04-03-2024, 03:16 PM
Last Post: _Aka_

Forum Jump: