Demigiant Forum

Unity Assets => DOTween & DOTween Pro => Topic started by: JosYule on July 04, 2015, 04:08:35 PM

Title: Target a different transform with DotweenAnimation component
Post by: JosYule on July 04, 2015, 04:08:35 PM
Hello.

Sometimes i need to create multiple chained sequences of movements with multiple DOTweenAnimation components. I'd like to be able to organize them using different GameObjects, so they are not all on a single GameObject, which makes it very hard to figure out what comes after what. For this to work, i would need a way to target a transform which is not the one the DOTweenAnimation component is part of.

I guess this is a feature request! :)

Thanks!
Jos
Title: Re: Target a different transform with DotweenAnimation component
Post by: Daniele on July 04, 2015, 04:16:30 PM
Hi again Jos!

I'm afraid that would be rather complicated. I had built something like that for HOTween, but having both a target-less Sequencer and a DOTweenAnimation engine on the same project would require a lot of work. I'm adding it to my todo list though, but on the "maybe" section :)

In the meantime, you can use a trick. You know that, if you use DOTween via script, you have Sequences (http://dotween.demigiant.com/documentation.php#creatingSequence), which do exactly what you mean to (and please mind, the tweens added to a Sequence don't need to be in a sequence: they can overlap each other—I know, bad naming choice)? So you could either script those animations or, if you want to use the visual DOTweenAnimation editor, do something like this: