05-27-2016, 05:29 PM
Hello,
I've been developing my project and Curvy has been incredibly helpful in doing so. I'm trying to add some additional functionality.
I'm looking for the ability to define how long it will take (in seconds) a Spline Controller GameObject to move between two pre-defined points of the spline at runtime.
So let's say I have another script in which I've already defined the specific segment of the spline by assigning two GameObject variables, which are two control points on the Curvy spline. I want the script to tell the Spline Controller how long it should take to move between these two distances in actual, exact, real-world seconds of time. Here's what I'm talking about in pseudocode, so you get the idea:
GameObject segmentStart = CP0003 (GameObject path point on a spline with CurvySplineSegment component)
GameObject segmentEnd = CP0006 (another GameObject path point on the same spline with CurvySplineSegment component)
float segmentDuration = 12.5f;
At runtime, I want my script to be able to tell the SplineController that it should take a total of "segmentDuration" seconds to travel between "segmentStart" and "segmentEnd".
I would then likely define the next segment (say, CP0006 thru CP0008) and assign it a different float value for "segmentDuration", and do this several times for several different segments over the course of the spline.
I've tried a few different things but to no avail. Any ideas?
Thanks very much!
Michael
I've been developing my project and Curvy has been incredibly helpful in doing so. I'm trying to add some additional functionality.
I'm looking for the ability to define how long it will take (in seconds) a Spline Controller GameObject to move between two pre-defined points of the spline at runtime.
So let's say I have another script in which I've already defined the specific segment of the spline by assigning two GameObject variables, which are two control points on the Curvy spline. I want the script to tell the Spline Controller how long it should take to move between these two distances in actual, exact, real-world seconds of time. Here's what I'm talking about in pseudocode, so you get the idea:
GameObject segmentStart = CP0003 (GameObject path point on a spline with CurvySplineSegment component)
GameObject segmentEnd = CP0006 (another GameObject path point on the same spline with CurvySplineSegment component)
float segmentDuration = 12.5f;
At runtime, I want my script to be able to tell the SplineController that it should take a total of "segmentDuration" seconds to travel between "segmentStart" and "segmentEnd".
I would then likely define the next segment (say, CP0006 thru CP0008) and assign it a different float value for "segmentDuration", and do this several times for several different segments over the course of the spline.
I've tried a few different things but to no avail. Any ideas?
Thanks very much!
Michael