my player is not moving after implementing animation more detail below

so i wanted my player to run and jump and it was doing great but after I implemented animation my player is not moving nor he is falling to the ground even rigidbody 2d and box collider 2d is not working the player is stuck in the scene but the animation is working fine and i also put debug.log() but there is no issue the script debug is showing that the player is falling to the ground and player is even running when i press buttons but only in the console not in the scene everything is showing perfectly working in the console after debug.log() but in the scene it is not doing anything in the scene the player is doing the idle animation and run animation when I press the button
I HAVE ATTACHED THE FOLLOWING SCREENSHOT OF MY PLAYER INSPECTOR AND PLAYER MOVEMENT SCRIPT
```csharp
**using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Character2DController: MonoBehaviour{
public float speed;
public float jumpForce;
private float moveInput;
private Rigidbody2D rb;

private Animator anim;

void Start(){
anim = GetComponent();
rb = GetComponent();
}
void FixedUpdate(){
moveInput = Input.GetAxis(“Horizontal”);
rb.velocity = new Vector2(moveInput * speed, rb.velocity.y);
if(moveInput == 0)
{
anim.SetBool(“isRunning”, false);
}
else
{
anim.SetBool(“isRunning”, true);
}

}

}**
```



Make sure you’re not animating the root player position. Prove that it is the animation by removing it temporarily.

but how do I check that ?

Start with some thorough animation tutorials, or perhaps some discussions of root motion in the context of Unity animation.

thanks man my issue got solved

1 Like