- Home /
 
 
               Question by 
               hugemaggot · Dec 12, 2010 at 07:47 PM · 
                animation  
              
 
              animation script help
can anyone edit my scipt so that when i walk as the scipt says witch i have made it plays my animation so that my character walks here is my script.
    var maxWalkSpeed = 10.0;
var maxTurnSpeed = 100.0;
function Update () {
    // Get the horizontal and vertical axis.
    // By default they are mapped to the arrow keys.
    // The value is in the range -1 to 1
    var walkSpeed = Input.GetAxis ("Vertical") * maxWalkSpeed;
    var turnSpeed = Input.GetAxis ("Horizontal") * maxTurnSpeed;
    // Move translation along the object's z-axis
    transform.Translate (0, 0, walkSpeed * Time.deltaTime);
    // Rotate around our y-axis
    transform.Rotate (0, turnSpeed * Time.deltaTime, 0);
}
 
                
              
               Comment
              
 
               
              Haven't you already asked this question (http://answers.unity3d.com/questions/31385/my-animation-script-does-not-work)? And the answer is the same... you haven't called any animation components in your script...
yes but im asking if anyone can do it for me because i dont know how
Your answer
 
             Follow this Question
Related Questions
Unity3D AI using animations 1 Answer
my animation script does not work 0 Answers
Simple Attack Script Problem 2 Answers
animating character 1 Answer
Unity animations not working 1 Answer