To get to the point - fundamentally my question is: Is it possible to create an iTween path parented under a GameObject and animate it in the local space of that GameObject?
I’ve been working with iTween alot lately and I love what it does, but there is one use case that I haven’t been able to figure out how to implement. Namely, that would be parenting an iTween path to a GameObject and and then having the iTween path animate in local space rather than world space.
From what I’ve seen via documentation and experimentation, iTween seems to only want to animate in world space, and functions based on world coordinates. Even when you set the islocal
property to true
in MoveTo, it seems to just reinterpret a transform’s localPosition
property into a world coordinate.
To get a better idea of why one would want to do this, here’s one practical application:
Fixed-Camera animations. Let’s say you have a racing game, where you have 2 mount points for a camera parented to a car - one facing forward behind the car, and one rear view from in front of the car. If we wanted to animate from one point to the other, say to have the camera swing around the side of the car to end up at the front, using an iTween path parented to the car’s origin would be a great option. The path moves with the car, and then you set the path points in local space relative to the car’s origin.
iTween would be the perfect tool for this in Unity, it gives great flexibility for tweaking and/or randomizing camera animation. Perhaps I haven’t dug deep enough to find the solution…or maybe iTween doesn’t support what I’m looking for. Does anyone know which is the case?
Thanks in advance.