Unity Ninja Unity 3D Forum
To have exclusive access to all downloads, recourses and links within this forum, a free registered account is required. Just a heads up Wink

You are not connected. Please login or register

Unity Ninja Unity 3D Forum » HELP » Help (General) » Walking and Jumping Animation

Walking and Jumping Animation

View previous topic View next topic Go down  Message [Page 1 of 1]

1 Walking and Jumping Animation on Sun Jul 20, 2014 7:56 am

ChuckNorris1007


Member [Lv. 1]
Member [Lv. 1]
Hi ninja
I need some help and this is my first day with unity. I am onto tutorial 3 and I had created the walking script and animation correctly as well with jumping animation. When I play, it doesn't move and I don't know the problem. I do see that you have to put the script with the gun but I have my arms parent with the gun because it showed that from tutorial 2. But on tutorial 3 the gun was parent to the arms and I am really confused on how to solve this.
Thank you!

Walking:
function Update()
{
if(Input.GetKeyDown("w"))
{
// Plays the walkinganimation animation - stops all other animations
animation.Play("walkinganimation", PlayMode.StopAll);
}
}

Jumping:
function Update()
{
if(Input.GetKeyDown("space"))
{
// Plays the jumping animation - stops all other animations
animation.Play("jumping", PlayMode.StopAll);
}
}

View user profile

2 Re: Walking and Jumping Animation on Tue Jul 22, 2014 1:41 am

Okay it dosen't matter if the gun is the parent or if the hand is, but the parent has to be the one that contains the animation. There should not be any problems if you have the animation under the parent.

View user profile http://www.youtube.com/user/misterninjaboy

View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum