Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

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:
    32
    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:
    599


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

    ThatProgrammerJack

    Joined:
    Jan 6, 2019
    Posts:
    32
    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:
    599
    Yep, exactly.
     
    ThatProgrammerJack likes this.