- Home /
Animation Help!!!!!
Hello, A quick question.. how would i make it so that i can play two animations at the same time.. to go in to more detail When i hit the "W" key my walk animation activates and it moves forward so it looks like im walking but what i now want is the when im walking witht he animation still playing i want to be able to shoot my sniper.. the sniper i have is a bolt action sniper so when i shoot it reloads straight away and then when the shoot/reload animation is finished i want the walking animation to keep going :/ i have some code which im currently using
function Update()
{
if(Input.GetKey("W"))
animation.Play("Walk");
else if(Input.GetKey("mouse 0"))
animation.Play("Shoot/Reload");
}
So if anybody could help that would be great
Thanks..
Answer by RockDude · Nov 06, 2011 at 11:09 PM
I don't think you can't play 2 animation at same time on same object...But I think if your character has bones then you can add walk animations to legs and shoot animation to hands... but you must make 2 scripts. Script to legs:
if(Input.GetKey("W"))
animation.Play("Walk");
Script for hands:
If(Input.GetKey("mouse 0"))
animation.Play("Shoot/Reload");
I'm not sure will it work but you should try it.
Your answer
Follow this Question
Related Questions
Sniper Zoom!!! 1 Answer
Collider Animation 1 Answer
Animation stoping!! 1 Answer
Expecting EOF found else?? 1 Answer
Dice Value 1 Answer