- Home /
Controlling Animation Headbob with Walking Speed?
I don't know how to do this, since I'm fairly new and I haven't gotten around to learn everything yet.
if you haven't gotten around to learn anything yet then I suggest you do. There are hundreds of Unity tutorials out there. Just search using google and learn. We all have equal chance at learning something thanks to the internet.
Answer by RedCherryStudios · Aug 08, 2013 at 01:50 PM
Hmm, i would not know how to do this dynamically but you could set your walk speed to static and get the variables to use on another script which controls animation e.g.
function Update () {
if(PlayerSpeed =1)
animation.Play("HeadBobSlow");
}
if(PlayerSpeed =3)
animation.Play("HeadBobMedium");
}
if(PlayerSpeed =5)
animation.Play("HeadBobFast");
}
This definitely is not the best method though.
Also note without your script i cannot correctly build it for you.
Your answer
Follow this Question
Related Questions
How to make camera position relative to a specific target. 1 Answer
Walk to Jog to Run 0 Answers
Making FPSController Stagger 0 Answers
Making an animation on Input run at a speed declared by a variable in another script? 0 Answers
Mixamo Animation: How to rotate my character while walking? 0 Answers