- Home /
Itween change paths at runtime?
Hello i am using itween plugin and also using itween path i have made 2 paths side by side how can i ride once path and then change to the other path but start where i left the other path? Is this possible is there any other way of doing this? here is my code to ride the path:
using UnityEngine;
using System.Collections;
public class follow : MonoBehaviour {
// Use this for initialization
void Start () {
iTween.MoveTo(gameObject, iTween.Hash("path", iTweenPath.GetPath("1"), "time", 5, "easetype", iTween.EaseType.easeInOutSine));
}
}
Answer by robertbu · Jul 02, 2013 at 06:05 PM
You can use iTween.PutOnPath() or iTween.PointOnPath() and manage the fraction value yourself using Mathf.Lerp() or something similar. Here is a answer with a script for someone who was trying to do something very similar:
http://answers.unity3d.com/questions/408334/itween-path-swap.html
Your answer
![](https://koobas.hobune.stream/wayback/20220613105342im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
GameObject to follow another GameObject through a spline with a dynamic end waypoint 0 Answers
Orientation along spline path / Mesh extrusion along path, problem with smooth orientation 1 Answer
Draw path to follow with mouse problems 0 Answers
Android - Access Video from StreamingAssets 0 Answers
how to set an object on a path,how to set an object on a track 0 Answers