{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Animate a GameObject along a spline | Splines | 2.5.1
docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Animate a GameObject along a spline

    Move a GameObject along a spline.

    Use the Spline Animate component to define the movement of cameras, characters, or other GameObjects in the Editor.

    You must have a GameObject with a Spline component attached to it in your scene to select as the target spline for the Spline Animate component.

    By default, the Spline Animate component uses the Time method to animate a GameObject with set to complete after 1 second. To change what animation method your GameObject uses and how it moves along its target spline, refer to Configure the movement of a GameObject.

    To animate a GameObject along a spline:

    1. Add the Spline Animate component to a GameObject that you want to animate along a spline.
    2. In the Spline Animate component, for the Spline property, select a GameObject that has an attached Spline component that you want to animate on.
    3. To view the animation in the Scene view, select Play in the Spline Animate component's Preview panel.

    Additional resources

    • Control the animated GameObject's movement
    • Change the alignment of an animated GameObject
    • Spline Animate component reference
    • Use components
    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)