Recent Posts

Pages: 1 ... 7 8 [9] 10
81
DOTween & DOTween Pro / Re: Start a tween on another object from a trigger.
« Last post by Daniele on April 11, 2016, 08:48:07 PM »
P.S. If using DOTween Pro, remember to set the tween as paused (and even disable autoKill if you plan to call it multiple time, in which case you'll need DOTween.Restart("key") instead of just Play) :)
82
DOTween & DOTween Pro / Re: Start a tween on another object from a trigger.
« Last post by Brick on April 11, 2016, 08:45:11 PM »
This is super cool. Thanks Daniele
83
DOTween & DOTween Pro / Re: Start a tween on another object from a trigger.
« Last post by Daniele on April 11, 2016, 08:34:53 PM »
Hi,

If you're using DOTween Pro, just give you tween a special ID (like "key"), then call

Code: [Select]
DOTween.Play("key");
If instead you're doing it all by code, as long as you grab a reference to your key transform (or whatever you want to animate) you can tween it from anywhere.

Cheers,
Daniele
84
DOTween & DOTween Pro / Start a tween on another object from a trigger.
« Last post by Brick on April 11, 2016, 08:30:51 PM »
Hi i have a chest and i want to activate a tween on a key which is under the chest. so when the plkayer enters the chest colider i want to play the move tween on the key.

Not sure how to go about this thanks

Daniel
85
DOTween & DOTween Pro / Re: Is DOTween Path relative movement possible?
« Last post by Daniele on April 11, 2016, 04:23:31 PM »
Ahoy!

Once you set the path, it's fixed, and indeed the "relative" option only involves the drawing part. But! There's a but! If you call myDOTweenAnimation.DORestart(true), your tween will be restarted by considering the current position of your object as the starting point, and readapting the whole path to it :)

Cheers,
Daniele
86
DOTween & DOTween Pro / Is DOTween Path relative movement possible?
« Last post by princemoonrise on April 11, 2016, 12:58:12 AM »
Hello again.  I was wondering if it were possible to have a gameobject moving on a DOTween path move relative to its own position instead of world coordinates?  If my understanding is correct, is the "Relative" option in the Path Editor only applicable to editing the tween and does not apply to when the tween is actually used?

When I start a tween, the object always pops/teleports to waypoint 1's world coordinates when it begins.   Additionally, if a tween is in progress and something happens like a physics force to an object, it will pop back to the waypoint's world position which does not look good.  I've tried "Local Movement" but it does not seem to fix this.  For instance if I make waypoint 1 be (0, 40, 0), can I make the object just move to y 40 from wherever the gameobject is (treating the gameobject as (0, 0, 0), rather than teleport to (0, 40, 0) when the path is started?  If an object's position changes between one waypoint to the next, can it smooth it out and re-plot the next waypoint accordingly instead of popping?  I know I can probably just use DOMove for simple movement but Path patterns allow so much more.  I apologize if I may not understand very well how it works.

Perhaps a solution can be brute-forced by having the waypoint values offset based on the gameobject's position when the tween is started or when a waypoint is reached, but I have a feeling that there is a built-in or correct way to do this that I have not found.  Please advise.  Again, thank you very much for your tool.
87
DOTween & DOTween Pro / Re: Tween overwriting
« Last post by Daniele on March 31, 2016, 03:08:23 PM »
You could either use ChangeValues, or depending on the settings you want to change you could just chain them again and they will overwrite the previous ones (most chained settings can be applied at any time).

Also, in case of the same animation playing forwards or backwards (like a button press or a UI element entering/exiting), I usually just use the same tween (with SetAutoKill to false) and use PlayForward/PlayBackwards to switch its direction.
88
DOTween & DOTween Pro / Re: Tween overwriting
« Last post by Leetful on March 31, 2016, 02:53:24 PM »
Thanks for the info.

Related question, is there a convenient way of updating an existing tween (either in-progress or after it's finished) with a new set of animation properties and re-running it without creating a new tween and having to pause/kill the last?
89
DOTween & DOTween Pro / Re: Tween overwriting
« Last post by Daniele on March 30, 2016, 03:28:01 PM »
Hi,

I have to confirm there's no overwrite in DOTween. Its previous version, HOTween, had it, but I decided not to implement it in DOTween because the only way to have it is to use Reflection, and I wanted to avoid any of it this time (mainly for performance reasons).

Consider though that you don't need to kill a tween in order to allow an overlayed one to play: you can just pause it.

Cheers,
Daniele
90
DOTween & DOTween Pro / Tween overwriting
« Last post by Leetful on March 30, 2016, 03:21:41 PM »
Hi, question about overwriting tweens.

Wanted to confirm that tween 'overwriting' isn't a feature that already exists. For example, using scripts I've applied DOTWEEN to handle animation between different states of gameobjects (such as a mouse over/out). The problem is that applying an animation can come into conflict with those that are not yet complete -- so the previous animation has to be explicitly killed before applying the new one when it affects the same properties.

Is there a simple built-in way to combat this? My current less-than-ideal solution is using another layer of code above DOTWEEN to handle setting animations, which kills previous ones itself.
 
Pages: 1 ... 7 8 [9] 10