Spline Animate component reference
Use the Spline Animate component to animate the position and rotation of a GameObject along a spline.
Property |
Description |
Spline |
Select a GameObject that has an attached Spline component you want to animate on. |
Up Axis |
Select which axis the animated GameObject uses as its up direction. The y-axis is the default up direction. |
Forward Axis |
Select which axis the animated GameObject uses as its forward direction. The z-axis is the default forward direction. |
Align To |
Select one of the following spaces to orient animated GameObjects to: - None: Set no alignment for the animated GameObject. The GameObject's rotation is unaffected.
- Spline Element: Align animated GameObjects to an interpolated orientation calculated from the rotation of the knots closest to its position.
- Spline Object: Align animated GameObjects to the orientation of the target spline.
- World Space: Align animated items to world space orientation.
|
Play On Awake |
Start the animation when the GameObject first loads. |
Start Offset |
Set a distance on the target spline to start the GameObject's animation at. The range is 0 through 1. A value of 0 starts the animation at the beginning of the spline and a value of 1 starts the animation at the end of the spline. |
Method |
Select the animation method that the animation uses. The Time method animates the GameObject along the spline from over a period of time measured in seconds. The Speed method animates the GameObject along the spline at a set speed measured in meters per second. |
Duration |
Set the period of time that it takes for the GameObject to complete its animation along the spline. This property is visible only when you enable the Time method. |
Speed |
Set the speed that the GameObject animates along the spline at. This property is visible only when you enable the Speed method. |
Easing |
Select the easing mode that the animation uses. Easing varies the speed of the animation to make it seem more natural and organic. The following easing modes are available: - None: Set no easing on the animation. The animation speed is linear.
- Ease In Only: The animation starts slowly and then speeds up.
- Ease Out Only: The animation slows down at the end of its sequence.
- Ease In-Out: The animation starts slowly, speeds up, and then ends slowly. Ease In-Out is a combination of Ease In and Ease Out.
|
Loop Mode |
Select the loop mode that the animation uses. Loop modes cause the animation to repeat after it finishes. The following loop modes are available: - Once: Set the animation to play only once.
- Loop Continuous: Set the animation to restart from its beginning after it finishes.
- Ease In Then Continuous: Set the animation to start slowly and then restart from its beginning after it finishes. If Ease In Only looping is set, then the easing applies only to the first animation loop.
- Ping Pong: Set the animation to play in reverse after it finishes. The animation plays repeatedly.
|
Preview |
Play, pause, or reset the animation. |
Time |
Select a specific time in the sequence of the animation. |
Additional resources
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.