Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Question Timeline on one GameObject to animate a different object

Discussion in 'Animation' started by ThatProgrammerJack, Apr 27, 2022.

  1. ThatProgrammerJack

    ThatProgrammerJack

    Joined:
    Jan 6, 2019
    Posts:
    30
    Hi, all. I’m trying to make a system whereby my player can interact with an object, which will cause a game sequence to play. For example, if the player interacts with a book on a table, the controls will be suspended temporarily, some audio will play, a subtitle will appear, maybe some post processing effects will occur, and then the controls will go back to normal.

    I have a PlayableDirector component and a custom script on the object in question. I’ll use the custom script to take input from an InputManager, detect the Player, and pause the Player’s controls. The problem is, how can I use the timeline to animate all the necessary values if they aren’t on the GameObject where the PlayableDirector is attached?
     
  2. Unrighteouss

    Unrighteouss

    Joined:
    Apr 24, 2018
    Posts:
    440


    1:14 in the video :)
     
    ThatProgrammerJack likes this.
  3. ThatProgrammerJack

    ThatProgrammerJack

    Joined:
    Jan 6, 2019
    Posts:
    30
    That’s extremely useful! So basically I can have a playable on one object with animation tracks for each other GameObject I want to animate?
     
  4. Unrighteouss

    Unrighteouss

    Joined:
    Apr 24, 2018
    Posts:
    440
    Yep, exactly.
     
    ThatProgrammerJack likes this.