TA/Unity2013. 6. 21. 10:03

iTween Path collider충돌시 멈추기

 

using UnityEngine;
using System.Collections;

public class test : MonoBehaviour {


 
 void Start () {
 iTween.MoveTo(gameObject, iTween.Hash("path", iTweenPath.GetPath("New Path 3"), "time",5,"easetype",iTween.EaseType.linear));
 }
 
 void stop(){
  iTween.Stop(gameObject);
 }
 
 void OnTriggerEnter(Collider col)
 {
  stop();
 }
}

Posted by 프리랜서 디자이너