Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get position of all control points for a spline
#1
Hello,

Just starting out with Curvy, sorry of this is a dumb question. I'm trying to do what feels like it should be very simple. 

I'm using a Curvy UI Spline to create a path for a 2d world map. I have plotted control points for locations for each level. Now I just want to get the position of all of the control points so I can spawn a level button there, but...there doesn't seem to be a way to just get the transform of a control point?

I feel like I'm missing something?  There's a bunch of set position / rotation methods on the CurvySplineSegment class, but no simple 'get position'? 

Should I just bypass Curvy and get the transforms of the gameobject children of the spline?  

Feels strange that this is so difficult.

Thanks in advance,
Mike W
Reply
#2
Hi Mike,

The list of control points is available through this member: CurvySpline.ControlPointsList.

https://api.curvyeditor.com/FluffyUnderw...PointsList

Then you can get the position of the control point as you would do for any other Unity game object.

Did this help?
Have a nice day
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Curvy Line Renderer for UI Spline? gekido 7 1,258 07-13-2025, 07:11 PM
Last Post: _Aka_
  Is there a way to get the position of each ControlPoint in spline by API? Chanon 1 250 06-07-2025, 09:44 AM
Last Post: _Aka_
  Filling a closed spline dynamically rickgplus 1 458 04-16-2025, 08:56 AM
Last Post: _Aka_
  OnAfterControlPointAdded - Control Point is null jh092 5 1,006 02-04-2025, 09:31 PM
Last Post: _Aka_

Forum Jump: