- Home /
Question by
unity_9447unni9447 · May 23, 2020 at 04:24 PM ·
animationanimatorthird-person
Make the character smoothly do the strafe movement.
Hello and really sorry for my bad English. I am working on a third person shooter game for over a week. and I had encountered a problem in creating animation for character. I downloaded all the animations from mixamo.com and all are just working fine except when I suddenly change from left to right strafe, the blend tree doesn't blend my animation. the animation is really quick. also when i change the animation from forward to backward or vise versa. I used freeform cartesian in blend tree. given below is the script i used to drive the values in animator. THANKS IN ADVANCE
public class PlayerMovement : MonoBehaviour {
private Animator PlayerAnimation;
void Start()
{
}
void Update()
{
PlayerAnimation.SetFloat("MagX", Input.GetAxis("Horizontal"));
PlayerAnimation.SetFloat("MagY", Input.GetAxis("Vertical"));
}
is their any problem in my script ?
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612235055im_/https://answers.unity.com/themes/thub/images/avi.jpg)