08-06-2023, 09:47 PM
Hi
I see few ways of doing it:
I see few ways of doing it:
- The one you suggested, using custom events: These events are implemented using regular Unity. I can't try it for now yo be sure (I am on vacation), but try making a public method that takes an AnimationCurve, and see if the event can call it)
- Automatic speed variation based on the tangent variation: Change the speed of the controller based on the curvature of the track. You can compute it by computing the delta between the spline tangent at a specific point vs at a point slightly before.
- Using MetaData. Scene 01_MetaData shows how a controller has a height variation using meta data. You can do something similar to modify the speed.
I hope this helped. Have a nice day
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.