11-09-2015, 09:43 AM
Hi,
I guess you're using a custom controller then. If not, do that! A simple custom controller should be sufficient, see the controller section here for an overview. Then, for example in UserAfterUpdate(), you can use RelativePosition (it's actually TF for a SplineController) to get all the informations you need. CurvySpline.TFToSegment() gives you both the segment (and it's ControlPointIndex property) and the resulting localF on that segment.
You also can alter the Speed and the Spline property in UserAfterUpdate(). Also, consider using MetaData to get the needed speed or any other data needed (e.g. if the player can switch spline etc...). Tip: You are not bound to lerp values in your metadata class. The DTTween class (part of DevTools) gives you the usual easing methods used by all tweening libs.
Does that help?
I guess you're using a custom controller then. If not, do that! A simple custom controller should be sufficient, see the controller section here for an overview. Then, for example in UserAfterUpdate(), you can use RelativePosition (it's actually TF for a SplineController) to get all the informations you need. CurvySpline.TFToSegment() gives you both the segment (and it's ControlPointIndex property) and the resulting localF on that segment.
You also can alter the Speed and the Spline property in UserAfterUpdate(). Also, consider using MetaData to get the needed speed or any other data needed (e.g. if the player can switch spline etc...). Tip: You are not bound to lerp values in your metadata class. The DTTween class (part of DevTools) gives you the usual easing methods used by all tweening libs.
Does that help?