using System.Collections; using System.Collections.Generic; using UnityEngine; public class IsMovingTester : MonoBehaviour { private Animator animator; private Rigidbody2D rb; void Start() { animator = GetComponent(); rb = GetComponent(); } void Update() { if (rb.velocity.magnitude > 0.1f) { animator.SetBool("IsMoving", true); } else { animator.SetBool("IsMoving", false); } } }