Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Moving multiple controllers at once
#15
(02-02-2020, 05:43 PM)_Aka_ Wrote: Hi,
  • 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
Yes I know this, you answered with the exact same line as I posted as example. Huh  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. Big Grin 

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.
Reply


Messages In This Thread
Moving multiple controllers at once - by Lupp_ - 01-15-2020, 07:46 PM
RE: Moving multiple controllers at once - by Lupp_ - 02-02-2020, 06:49 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Updated package in 2022 LTS resulted in multiple errors scr33ner 2 1,941 01-13-2025, 09:32 AM
Last Post: _Aka_
  Moving Platform Kokoriko49 8 4,908 09-23-2024, 09:20 AM
Last Post: _Aka_
  Distance travelled across multiple splines jh092 1 1,735 02-23-2024, 09:44 AM
Last Post: _Aka_
  Best practice for controllers slowing down/speeding up along the spline Curry 1 1,575 08-06-2023, 09:47 PM
Last Post: _Aka_

Forum Jump: