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 will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
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 will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


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_
  Get position of all control points for a spline gekido 1 6 03-28-2024, 10:08 PM
Last Post: _Aka_
Bug Changing spline connection in inspector causes splines to revert to defaults lacota 3 6 03-18-2024, 07:55 PM
Last Post: _Aka_
  GO can't fit end of the spline GameDeveloperek4123 3 14 03-04-2024, 11:06 AM
Last Post: _Aka_

Forum Jump: