Demigiant Forum

Unity Assets => DOTween & DOTween Pro => Topic started by: abe on July 29, 2015, 06:17:45 PM

Title: Move object towards the path to position.
Post by: abe on July 29, 2015, 06:17:45 PM
Hello. How to do next steps using DoTweenPro
1)Add gameobject .
2)Add DoTweenPath component to it.
3)Start the tween.
4)Stop the tween on event (click for example).
5)Move gameObject to Position on the path.
6)Move gameObject forward\backward x points towards the path.
7)Start the tween again.

I have no idea how to do item 5 and 6. Thank You for help.
Title: Re: Move object towards the path to position.
Post by: Daniele on August 04, 2015, 06:02:26 PM
Hi, and apologies for the late reply,


You can move to a waypoint on the path by using GotoWaypoint (http://dotween.demigiant.com/documentation.php?api=GotoWaypoint) (you'll need to get a reference to the DOTweenPath's Tweener with myDOTweenPath.GetTween()).


Cheers,
Daniele
Title: Re: Move object towards the path to position.
Post by: abe on August 05, 2015, 01:23:24 PM
Hello. Thank you for the answer. But here is no way to move forward or backward for x units?
Title: Re: Move object towards the path to position.
Post by: Daniele on August 05, 2015, 01:52:56 PM
Hello,


No way to move by units, but you could use Goto (http://dotween.demigiant.com/documentation.php?api=Goto) to move by time.