johnatm / itween

Automatically exported from code.google.com/p/itween
1 stars 2 forks source link

iTween only supports one animation at a time, per game object #63

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a scene with a suitable GameObject to be rotated and translated by 
iTween.
2. Use iTween.MoveTo followed by (or proceeded, doesn't matter) a call to 
iTween.RotateTo.
3. Note that the object does not animate as expected.
4. Additionally, any callback that was associated with the first of the two 
calls will be lost.

I would expect the system to handle multiple animations concurrently, 
especially when different transform components are being used in each.

iTween version 2.0.43

This effect is due to the 'apply' data member of the iTween component. This 
ApplyTween delegate is overwritten when a new animation is added (TweenStart -> 
GenerateTargets -> Each case creates a new apply delegate after calling a 
Generate___Targets). This Generate____Targets method will overwrite the cached 
objects that are being 'tweened. For instance, in the example above, both 
MoveTo and RotateTo use Generate___Targets methods that end up caching data in 
the vector3s array. This means that whichever of the two is called last leaves 
its data in this array. Later in the ApplyTween delegate that is called with 
each update, this same data is used for tweening.

Given that no iTween method exists for interpolating full transforms, this 
makes it impossible for iTween to support the notion of animating to a 
particular position and orientation. 

Hope this info helps!

Original issue reported on code.google.com by Ronald.D...@gmail.com on 8 Apr 2011 at 12:11

GoogleCodeExporter commented 8 years ago
Hi Ronald,

Were you able to find a fix for this? I am seeing the same issue as well as 
reported on the thread here 
(http://forum.unity3d.com/threads/44438-iTween-animation-framework-for-Unity-rea
dy-for-use!?p=555184&viewfull=1#post555184). I found that this happens when I 
have a rigidbody on the object. But removing the rigidbody at run-time resulted 
in more errors from iTween script. Any thoughts?

Thanks,
Brandon

Original comment by Brandon....@gmail.com on 25 Apr 2011 at 2:15

GoogleCodeExporter commented 8 years ago
Any news on this?

Original comment by ecentin...@gmail.com on 4 May 2012 at 3:00

GoogleCodeExporter commented 8 years ago
any thing new here?

Original comment by mariam.a...@gmail.com on 7 May 2013 at 10:14

GoogleCodeExporter commented 8 years ago
I too, am waiting for something new here. Do other tweening libs have this same 
issue?

Original comment by piet...@windowslive.com on 30 May 2013 at 5:34

GoogleCodeExporter commented 8 years ago
I have work around this by putting my object under a parent empty object then I 
apply each itween motion on one of them and it worked fine :) 

Original comment by mariam.a...@gmail.com on 2 Jun 2013 at 1:08