docs.unity3d.com
    Show / Hide Table of Contents

    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.
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023