x


I need a character animation script

my character has a seperate move script and I want to animate it. I need the animation script that makes it that you press a key and it animates just a code would do also. Please help

more ▼

asked Feb 18 '11 at 10:42 PM

UnityU gravatar image

UnityU
1 1 1 1

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

This page explains clearly how you would script input based animation events:

http://unity3d.com/support/documentation/Manual/Animation%20Scripting.html

So for example:

function Update () {
   if (Input.GetAxis("Vertical") > 0.2)
       animation.CrossFade ("walk");
   else
      animation.CrossFade ("idle");
} 

This plays the animation "walk" when the player moves forward or backwards.

more ▼

answered Feb 18 '11 at 10:55 PM

GesterX gravatar image

GesterX
2.1k 13 16 37

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3768
x3314
x1040

asked: Feb 18 '11 at 10:42 PM

Seen: 2224 times

Last Updated: Feb 18 '11 at 10:42 PM