Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: nelsonn on February 03, 2016, 12:32:17 PM

Title: Creating an iTween path at runtime?
Post by: nelsonn on February 03, 2016, 12:32:17 PM
Hi there!

So what I'm trying to do is have a gameobject that is moving along an iTween path but the nodes for that path are set at runtime. The idea is to have an empty gameobject whose children are used as waypoints for my object.

Is there a way I can use the 'Look Ahead' functionality with such a runtime path if I don't know how many waypoints I might end up with?
I.e. can I somehow pass the child object count to the iTween Move To action?
Using an array I can pass a new tranform position to the iTween Move To action whenever one point has been reached but that way I can't get the 'look ahead' to work and the object's rotation looks bad.

Any ideas? :)