- Home /
Curvy package...How can i get all points
Hi everyone. Im using Unity curvy package, when i make curvy wall with 3 control points. These points are connect to red line, which is formed from this package(CurvySpline.cs and SplinePathMeshBuilder.cs), on this red line is mesh (cube) and then i have wall. So i need all position of these points from this red line. Anybody using this package, and can help me? Here is picture for better understanding.... what i need.
Answer by Raynoko · Oct 03, 2014 at 08:14 AM
My problem is solved. I found in my script, its name is "CurvySpline.cs" some function (public Vector3[] GetApproximation(bool local)), when i can see all points, what this script makes. Then i will make my own script and copy this points and their position on my Vectro3[].
floor_instantiate.GetComponent<FollowPointsCurveWall> ().singlewalls = apps;
floor_instantiate.GetComponent<FollowPointsCurveWall> ().onStarting ();
return apps;
Answer by Bunny83 · Oct 01, 2014 at 10:46 AM
I don't have this package, but you usually just have to sample the positions at your desired interval. Looking at the docs it seems that Interpolate is most likely what you want.
There is no way to get "all" points on a spline since a spline by itself is infinitely precise. You usually sample the spline at certain intervals. For example if you increase the "t" value by 0.1 each step, you get 11 points (0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0). But if you increase by 0.01 you get 101 points on the exact same spline.
I understand what do you mean, but i was looking for this. I already have these points, they are including in other scripts. So my problem is solved yet.
@Raynoko: Uhm, what? :D Do you want to say with that comment that your problem is solved? Or do you want to say it isn't solved yet?
If it's solved, either
accept an answer which lead to the solution.
if non of the answers was the solution, post your own answer and tell use what was the solution.
or if the question is no longer valid, close it or if you can't close it, ask for close in a comment.
If it's not solved please add more information and tell us what you actually expect from us since the given information isn't enough to tell you anything more about your problem.
Your answer
![](https://koobas.hobune.stream/wayback/20220613164149im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How do you set Particles to known positions? 4 Answers
Render spline? 2 Answers
Move to a clicked point? 1 Answer
How to place the GameObjects in a sequence on the plane 1 Answer
How to render object in front of other object no matter position? 1 Answer