Author Topic: Creating an iTween path at runtime?  (Read 767 times)


  • Playmaker Newbie
  • *
  • Posts: 31
    • View Profile
    • check out my portfolio :)
Creating an iTween path at runtime?
« on: February 03, 2016, 10:32:17 AM »
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? :)