- Home /
Question by
JoshuaMobley · Mar 05, 2015 at 10:53 AM ·
2djavascriptspritesprites
Can't Get 2D Sprite to Animate
So I have an animation for my 2D sprite titled "WalkingDown". It's attached to the player controlled sprite and the script i'm using is below. For some reason it keeps telling me that "down" isn't defined in the input but it is defined by default in unity under the vertical tab in edit -> projects Settings -> Input
#pragma strict
// Variables
var WalkingDown : Animation;
function Start () {
if (Input.GetButtonDown ("down")){
animation.Play("WalkingDown");
}
else {}
}
function Update () {
}
Comment
Your answer
Follow this Question
Related Questions
Fast Sprites Extraction from Sprite Sheet 0 Answers
2D Sprite Layering? 1 Answer
When i make my character animated, he can only move up, down left and right (2D) (JS) 0 Answers
Sprite disappears on android 1 Answer
Main menu help (javascript) 1 Answer