UnityNinja Community
Would you like to react to this message? Create an account in a few clicks or log in to continue.

UnityNinja CommunityLog in

UnityNinja - Video Game Development Community, including Resources, Forums, Marketplace & More.


descriptionWalking and Jumping Animation EmptyWalking and Jumping Animation

more_horiz
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);
}
}

descriptionWalking and Jumping Animation EmptyRe: Walking and Jumping Animation

more_horiz
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.
privacy_tip Permissions in this forum:
You cannot reply to topics in this forum
power_settings_newLogin to reply