- Home /
Overriding the animation movement speed using transform
Hi all, I have a character that is being moved around the gameworld using its animation.
ie. I have a bool that sets the walking state and the character moves at the speed of the walking animation.
Now, what I want to do is be able to tweak the move speed with a float value, but when I use the following code, it still moves at the same speed as the animation.
if (Input.GetButton("Forward"))
{
transform.position += transform.forward * Time.DeltaTime * runSpeed;
}
So my question is, how can I tweak the animation speed of the characters walk anim?
Many thanks :)
You can ovverride from FixedUpdate but not Update I believe, perhaps that is your problem :)
Your answer
Follow this Question
Related Questions
transform.position assign attempt for 'Cubie' is not valid. Input position is { NaN, NaN, NaN }. 2 Answers
Change animation at runtime with Mecanim 0 Answers
Varying behaviour of transform.position.localPosition.x in StateMachineBehaviour OnStateUpdate 1 Answer
Offset HandIK Target and SetIKPosition 0 Answers