enter code hereHey guys,
O.k so I found this really cool path example from itween that I would love to manipulate to use my own controls. As it stands you can draw a path and the object will follow. What I would like to achieve is the ability to control the character rather than it just running from point A to point B. Is there anyway I can direct this code to use the Unity 3rd person character controller??? Here’s the code
Oh, and thanks in advance!
var path : Transform[];
var style : GUIStyle;
private var buttonActivated : boolean;
function Start(){
tween();
}
function OnGUI () {
if(buttonActivated){
if(GUI.Button (Rect (67,178,113,32), "",style)){
reset();
tween();
}
}
}
function OnDrawGizmos(){
iTween.DrawPath(path);
}
function tween(){
iTween.MoveTo(gameObject,{"path":path,"time":7,"orienttopath":true,"looktime":.6,"easetype":"easeInOutSine","oncomplete":"complete"});
}
function reset(){
buttonActivated=false;
transform.position=Vector3(0,0,0);
transform.eulerAngles=Vector3(0,0,0);
}
function complete(){
buttonActivated=true;
}
Thanks! Didn't know about format either, that's done cheers! Will try your idea now.
– bundy2k6How did it go Bundy? I hope you got evreything working. I'm having a similar issue to you and wanted to know if you figured it all out! love to hear about your progress.
– aceleeon5