using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerMovement : MonoBehaviour {
public float moveSpeed;
public Animator anim;
// Use this for initialization
void Start () {
anim = GetComponent<Animator>();
}
// Update is called once per frame
void Update () {
if (Input.GetAxisRaw ("Horizontal") > 0.5f ||
Input.GetAxisRaw("Horizontal") < - 0.5f) {
transform.Translate (new Vector3
(Input.GetAxisRaw("Horizontal") * moveSpeed * Time.deltaTime, 0f, 0f));
}
if (Input.GetAxisRaw ("Vertical") > 0.5f || Input.GetAxisRaw ("Vertical") < -0.5f) {
transform.Translate (new Vector3 (0f, Input.GetAxisRaw ("Vertical") * moveSpeed * Time.deltaTime, 0f));
}
anim.SetFloat("MoxeX", Input.GetAxisRaw ("Horizontal"));
anim.SetFloat("MoxeY", Input.GetAxisRaw ("Vertical"));
}
}
I an trying to run this with a basic 2D animation in unity personal and I keep getting Warning! - Parameter "MoveX" does not exist and Parameter "MoveY" does not exist but it is clearly in the animator as a float.