Open GoogleCodeExporter opened 8 years ago
I've since realized that this only occurs when the object has a rigidbody. As a
workaround I've begun running a tween only on child meshes when the timescale
is zero.
Original comment by tatsus...@gmail.com
on 12 Nov 2011 at 7:55
I ran into this same problem. I may have a fix for iTween not moving the
gameObject.
The root of the problem is that when a gameObject has a rigidBody then iTween
does the correct thing and updates the rigidbody in FixedUpdate and uses
RigidBody move methods. However when the timescale is set to 0 then physics is
disabled so all calls to FixedUpdate stop and any calls to RigidBody move
methods don't happen.
So I added another bool to keep track of if Physics is enabled globally and if
not then ignore the rigidbody on the gameobject.
In Update() I added
if (Time.timeScale == 0f && useRealTime)
{
physics = false;
}
and in FixedUpdate I added
if (tryToUsePhysics)
{
physics = true;
}
and init'd the tryToUsePhysics in the RetrieveArgs call.
This way my objects move regardless if phsyics is enabled or not (and continue
to move if physics is enabled/disabled during the move).
Original comment by pco...@gmail.com
on 1 Apr 2013 at 10:44
Original issue reported on code.google.com by
tatsus...@gmail.com
on 31 May 2011 at 5:12