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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Custom Clip Preview different if played backwards

Discussion in 'Timeline' started by Sangemdoko, Jun 4, 2022.

  1. Sangemdoko

    Sangemdoko

    Joined:
    Dec 15, 2013
    Posts:
    218
    Hi,

    I have a custom clip which spawns a prefab (Inspired by the control track but with an offset)

    I spawn the prefab and position it with the offset relative to another gameobject (not a parent) in "OnBehaviourPlay".

    My issue is if the transform moves with an animation the prefab is spawned wherever that gameobject is when the OnBehaviourPlay is entered. Wheter it is at the start when going forward or at the end when going backwards.

    Is there anyway I can know the position of an object animated in an animation track or other custom track at any point?

    This would allow me to get the position of the object at the start of my clip. This way I can keep things consistant no matter how the timeline is played.

    Thank you for your time