02-02-2020, 06:49 PM
(02-02-2020, 05:43 PM)_Aka_ Wrote: Hi,Yes I know this, you answered with the exact same line as I posted as example. What I need to know is what to actually type to get AbsolutePosition from the array you posted. I tried to look at some scripts that comes with the example scenes for some hints, but it's no good, I can't figure out how the syntax works. To make it clear, I know what to do, just not how.
- To set and get the absolute position, use the AbsolutePosition property.
- To store them in an array, you can use a simple foreach. If you want to use Linq (warning, this means a memory allocation at each call), you can do this: Selection.transforms.Select(t => t.gameObject.GetComponent<SplineController>()).Where(c => c != null).Select(c => c.AbsolutePosition).ToList()
- If I understood correctly you question about the end point, you need to use the CurvySpline.Length property
What I meant by end point is the value of the final control point, that is the maximum value the controllers position can be/is clamped at.