Quantcast
Channel: Questions in topic: "javascipt"
Viewing all articles
Browse latest Browse all 1875

Walk animation wont play but idle will

$
0
0
Hi!, I am making a FPS game but my walk animation won't work, when i press W,A,S, or D, my gun just jerks heres my script(In javascript): function Update() { if (Input.GetKeyDown(KeyCode.W)) { GetComponent.().CrossFade("Walk"); } else if (Input.GetKeyDown(KeyCode.A)) { GetComponent.().CrossFade("Walk"); } else if (Input.GetKeyDown(KeyCode.S)) { GetComponent.().CrossFade("Walk"); } else if (Input.GetKeyDown(KeyCode.D)) { GetComponent.().CrossFade("Walk"); } else { GetComponent.().CrossFade("idle"); } } So, like I said, My idle animation will play, but when I press WASD, it just has the gun jerk, then okays the idle again, even if I hold WASD. thanks.

Viewing all articles
Browse latest Browse all 1875

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>