i have a path for player to move ..... along with two cameras follow him sidewise and a particular time that side cam disabled and back cam enabled and follow tha player both cam's have separate itween path.........i need last nodes value to enable other cams...... how can i get it......
i have the following script
using UnityEngine; using System.Collections; using System.Collections.Generic;
public class PlayerWalkFollow1 : MonoBehaviour { public GameObject PlayerFollowCam1; public GameObject FirstPersonCam; public GameObject Player;
void Start () {
//if(Time.time >=5) {
//PlayerFollowCam1.active = true;
FirstPersonCam.SetActiveRecursively(false);
iTween.MoveTo(gameObject, iTween.Hash("path" , iTweenPath.GetPath("PlayerWalkFollowCam1"), "time" , 29, "easeType", iTween.EaseType.easeInOutSine));
//}
}
/*void OnEnable () {
timing1 = 16.0f;
}*/
void Update () {
iTweenPath other = PlayerFollowCam1.GetComponent<iTweenPath>();
// other.pathName = "PlayerWalkFollowCam1";
// other.nodeCount = 6;
if(other.pathName == "PlayerWalkFollowCam1" && other.nodeCount == 6) {
FirstPersonCam.SetActiveRecursively(true);
PlayerFollowCam1.active = false;
Player.SetActiveRecursively(false);
}
}
}