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

Cant switch between legacy animations

$
0
0
I have 2 animations for an FPS arm/gun. One for hipfire and one for aiming down sights. The problem is it only plays the hipfire animation even when aiming down sights. I'm using a simple javascript in Unity 5.2 Is there something I'm missing? The "Pistol001Shot" is the hipfire and the "Pistol001ShotAim" is the aim down sights. var gunsound : AudioSource = GetComponent.(); function Update () { if (Input.GetButtonDown("Fire1")) { if (Input.GetButtonDown("Fire2")) { gunsound.Play(); GetComponent.().Play("Pistol001ShotAim"); } else if (!Input.GetButtonDown("Fire2")) { gunsound.Play(); GetComponent.().Play("Pistol001Shot"); } } }

Viewing all articles
Browse latest Browse all 1875

Trending Articles



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