- Home /
Switching Paths with iTween
Hello I have a camera following an iTween Path and I want the camera when it collides wit an object to move to another path
Here's the code thats not working :
Thanks in advance
using UnityEngine;
using System.Collections;
public class triggerPath : MonoBehaviour {
public Transform[] NewPath;
public float percentage;
public GameObject myCam;
void OnTriggerEnter(Collider other) {
iTween.PutOnPath(myCam,NewPath,percentage);
}
}
Comment
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
iTween RotateTo 1 Answer
Illuminating a 3D object's edges OnMouseOver (script in c#)? 1 Answer
Switching Between (many) different iTween Paths (C#) 0 Answers