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