Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Move CP00X position in hierarchy
#1
Hello ! I have a little issue.

I am manually adding point on a spline, using spline.Add(Vector3 position).

After the creation, I would like to manually order myself the position of the point in the spline
[Image: IKmkDDvZ4OZ_spline.png]

How, From script, can i change the order of a CurvySplineSegment ? (and update the spline to do the calculation)

Thanks !
Reply
#2
Hello
Unity's API has this method to define the rank of an game object in its hierarchy:
https://docs.unity3d.com/ScriptReference/Transform.SetSiblingIndex.html
Then after you are done changing the order of CPs, call CurvySpline.SyncSplineFromHierarchy(), and if needed CurvySpline.Refresh() after that.
That should be it. Please let me know if this didn't solve your issue.
Have a nice day
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
  Player move with object mcarman 4 8 07-29-2024, 06:49 PM
Last Post: mcarman
  Get position of all control points for a spline gekido 1 9 03-28-2024, 10:08 PM
Last Post: _Aka_
  Avoiding runtime GC allocations on control point position change Ell223 8 18 02-24-2024, 10:43 AM
Last Post: _Aka_
  How could I get position in spline from "From" value in BuildRasterizedPath? Chanon 1 8 02-12-2024, 09:54 PM
Last Post: _Aka_

Forum Jump: