Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"MetaData" Of Entire Spline Heightmap
#1
Hey Aka hope you are well, 

I have a general question about the best practice in which to approach getting info on the entire spline if you dont mind.  

Let's say I wanted to plot a graph of the height profile of my spline. Since I'm guessing control points are basically just normal unity gameobjects, my solution would be to just find all the control points of my spline and extract all the y values of each control point and then I could plot them against their absolute positions on the graph's x axis. 

Just wanted to ask is the right way to think about this? I plan to take more general info from the spline and do stuff with it like a minimap or whatever. So unless this info is saved somewhere I cant think of another way. 

Cheers!
Reply
#2
Hi Samy, I am doing well thank you, I hope you too.

Getting the information only from the CPs would give you an incomplete picture, since it will not take into consideration the variations in between CPs. I suggest using the spline's cache points, it has more granular information.

Here are some useful methods:

https://api.curvyeditor.com/FluffyUnderware.Curvy.CurvySpline.html#FluffyUnderware_Curvy_CurvySpline_GetPositionsCache_UnityEngine_Space_

https://api.curvyeditor.com/FluffyUnderware.Curvy.CurvySpline.html#FluffyUnderware_Curvy_CurvySpline_GetApproximation_System_Single_System_Single_System_Boolean_UnityEngine_Space_

I hope this helped.
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
#3
Solid pointers mate thank you - exactly the type of advice I was looking for.
Reply
#4
You are welcome.
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
  Method of scattering objects along spline joebain 1 3 11-26-2024, 03:20 PM
Last Post: _Aka_
  Curvy Line Renderer for UI Spline? gekido 5 13 10-29-2024, 10:19 AM
Last Post: _Aka_
  Nested Spline Volume Spot Instantiation merobbins5 3 7 07-26-2024, 09:58 AM
Last Post: _Aka_
  Left-right movement, and spline follow shihaya 3 10 07-12-2024, 12:50 PM
Last Post: _Aka_

Forum Jump: