01-31-2017, 12:37 PM
(01-30-2017, 05:46 PM)Jake Wrote: What about setting animation time by length of segment? You can access the segment either in the OnControlPointReached event or in your custom controller and it has a Length property.
I'd go the custom controller route (it's more flexible) and check the distance to the last and the next CP frequently. Then you can apply speed changes at will.
Its a good idea but I'm having some problems to try to accomplish that. I'm trying to create a custom controller based on SplineController, and access to the segment length and animation time from there (as you said). The problem is I am looking at the SplineController and CurvyController and cant handle how it works properly. I get access to Speed, Length, TF value and other data but I dont know how to access to the current segment (F and length) or the animation time.
Can you point me out how to access this values with a small code snipet please? (I know the theory from your advice, just not sure how to get the data necessary) I'm trying to understand both CurvyController and SplineController but there are many things beyond my comprehension.
Thank you again