iTween - Paths Attached to Parent gameObject how do I get hem to follow?

iTween - paths attached to parent gameObject how do I get them to follow?

I have a empty gameObject with the iTweenPath Script attached to it.
Id like this to be a child of another gameObject (which it is in the hierarchy).
Im moving the parent gameObject with the path gameObject as a child.

The thing I cant figure out is how can I get the paths to move with the parent object? Or is this not possible?

It seems like the paths are outside of the parent even though the gameObject with the itweenPath script is a child of it. Id like them to move together but Im not having any luck, any suggestions on how I can make this happen?

Hi zeek,

I also tried this without success. I think the reason behind this behaviour is that every defined “waypoint” isn’t an actual gameobject in world space, they’re just position coordinates. So a movement of your parent object does not effect anything, because the position coordinates of your iTweenPath points stay the same.

A possible solution would be to edit all point coords with an editor or runtime script:
Access the iTweenPath component, loop through the point array and translate x/y/z positions to fit to your editor script input.
This could require some hours of work though…

I would also like to mention my own implementation of iTween paths, available on the Unity Asset Store.
SWS: http://forum.unity3d.com/threads/115086-Simple-Waypoint-System-(SWS)-RELEASED
In this system every path consists of multiple waypoints, you can define different easetypes and looptypes for each one. Please take a look at the youtube video on this page.
Paths and waypoints are actual gameobjects in 3d space, so you can move them around as you wish.
Maybe that also fits your project?

Greetings,
Baroni

Sweeet!

Yeah as long as I can move my parent object and the paths will move with it SOLD!

Thank you for pointing this out I never would have found it :slight_smile: