iTween.Pause not pausing

Hi,
I have the following code cycling through an array of waypoints (from the iTween waypoint demo) and I’m trying to pause it at random times (when the player picks up a powerup).

iTween.MoveTo(gameObject,iTween.Hash("position",waypoints[currentWaypoint],"time",travelTime,"easetype",easeType,"oncomplete","MoveToWaypoint","Looktarget",waypoints[currentWaypoint].position,"looktime",0, "ignoretimescale", false));

The problem is, the animation does not pause. It slows down, and then when I call iTween.Resume it ignores the next waypoint and continues travelling along whichever axis it was moving along before (and during) the time it was “paused”.

I can’t help you so much, but i found some documentation for iTween.Pause command, you can check it from the official iTween Docu.

You can find it in https://hutonggames.fogbugz.com/default.asp?W603

Hope it works for you!

Thanks for the suggestion Vhael. I didn’t think to try the type. Unfortunately neither calling iTween.Pause(gameObject, “move”) or iTween.Pause() on the entire scene affects anything.

Have you tried iTween.Pause(gameObject), without the “move”?

Yes I have. Same effect. It just slows down the animation until I resume, then travels down the axis it was moving along before and ignores the end position of the animation.

EDIT: Additionally, the same thing happens when I try to pause MoveBy as well as MoveTo

I’m seeing the same thing here trying to pause a MoveTo() with a path.

trying to decipher why in the code doesn’t look like fun.

I’ve found a temporary workaround, where I save the gameObject’s current world position at the time of “pausing”. Then keep setting it’s position to that saved position in Update(). When the MoveTo call is finished, the callback function sets the next MoveTo() to the position I saved to make resuming work smoothly.

Upon resuming, I call MoveTo() again on the normal path (whichever point was next before I “paused”).

Bump

I tried on an obj with MoveTo - pause works, resume works.
I remember to have issues time ago… question: do you have last version? (2.0.45)

Hi. If an iTween is established with “ignoreTimeScale” set to true pause will not currently work.
This message is in the Itween documentation.
I suppose that’s why it doesn’t work since you’re using the “ignoreTimeScale”.