And thank YOU very much for supporting the project! It’s comments like these that make developing iTween such a joy.
The team, however, feels awkward about even offering a place to donate because we then feel like we’re asking for donations. We’d feel great though, if you could give what you would have given to us to Mr. Berkebile ![]()
I think what you’re asking is, if you were to set a Move From/To on an object using another object’s position and that position were to change, would the original tweening object then change its “To” to the new position? If so, the answer is no unfortunately because of Easetypes and Looping. This is the behaviour of the original iTween for Unity as well. Because we’re moving an object to a destination over time, it needs to know the endpoint beforehand so it can calculate the rate at which it will move and modulate it according to the Easetype. Even if you’re using “speed” as your Tick Type, you’re just running that value through an expression that converts it to “time” internally. As for loops, while Rewind doesn’t need to know the end position won’t change, Back-and-Forth (ping pong) does since the looping mechanism switches the “to” and “from” vectors.
We may be able to mitigate this issue and simplify it in the future with another “Move To Target” event or similar, but that’s in the backlog since there are two options you can try right meow:
-
Use Move Tick - this was made specifically for changing values and interpolating to them live. It doesn’t have as many options as the event-based moves, but it may be just what you’re looking for. Give it a shot!
-
Use Move Along Spline - MAS takes in a spline component and interpolates an object’s position to a point on that spline at a given time, so if you dynamically change the position of the spline’s endpoint then the tween will update dynamically as well. MAS was created half for allowing objects to move to multiple points along a path, half for being more flexible than the rigid Move From/To event.
I’ll be uploading some more tutorials later focused on spline operations with iTween and I will be sure to touch on this situation and how to use splines to get this effect.
All the best,
Sweet