Quantcast
Channel: Questions in topic: "issue"
Viewing all articles
Browse latest Browse all 827

New animator system issues (unity 4.3)

$
0
0
I'm having major problems working with the new animator system in unity 4.3 and wanted to know if anyone could give a quick bit of information on how I could do this: I have created animations for the shaking of the camera as the player is walking and sprinting. At the moment when I click play the animation plays automatically and I can't seem to stop it. I tried to create a basic script to control the animations, as I would have done in previous versions of unity. Unfortunately, I kept receiving errors saying that there were no animations attached to the object (camera). Here's the script I made: #pragma strict function Update () { if(Input.GetKeyDown(KeyCode.W)){ animation.Play("walkingAnimation"); } else if(Input.GetKeyDown(KeyCode.W) && Input.GetKeyDown(KeyCode.LeftShift)){ animation.Play("sprintingAnimation"); } if(Input.GetKeyUp(KeyCode.W)){ animation.Stop("walkingAnimation"); animation.Stop("sprintingAnimation"); } } Image of camera's (game object to animate) animation setup: ![alt text][1] I would appreciate any help that you may have and if you would like more information on my problem, feel free to ask. [1]: /storage/temp/22227-animation+problems.png

Viewing all articles
Browse latest Browse all 827

Trending Articles



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