Search Unity

Creating a reusable simple door opening cutscene?

Discussion in 'Timeline' started by marcos, Jul 30, 2019.

  1. marcos

    marcos

    Joined:
    Oct 18, 2009
    Posts:
    592
    Hi,

    Super simple question, but can't seem to find the solution in timeline:

    How do I make a reusable door opening cutscene where the player's position is always moved to the correct spot in front of the current door? This honestly shouldn't be a complicated task, but here we are.

    The idea being, I'll have my door prefab, i'll pop it all over the place, and it'll just work.

    Slate lets you set an actor's local position relative to the cutscene's transform, I basically need this, but in timeline:



    Is there a way to do this out of the box, or do I have to write a script to facilitate this? (Which is fine, but it just feels like there should be a way to do this out of the box, I don't want to waste my time).

    I've tried putting the track offsets to both Apply Transform Offsets and Apply Scene Offsets, neither do what I'm after. I've tried having a second track with an infinite clip and setting the transform on that one, and it just seems to use the same original position for all the doors positioned around the scene.

    Thanks in advance,
    Mark
     
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    That's a good use case. You would need to write a script to do this. Simplest one would probably to use SceneOffsets, and teleport the character to a given offset before playing the timeline.