Unity中添加完Animator后射线检测失去作用

private void FixedUpdate()//只有在FixedUpdate执行完后才会更新碰撞
{
transform.Translate(new Vector2(speed, 0));
if(Physics2D.Raycast(gameObject.transform.position,Vector2.left,0.1f,TurnLayer))
{
transform.Rotate(Vector3.up,180);//沿Y轴旋转180°
}
}
在Unity中添加完动画,射线检测就不起作用了

我刚试了一下并不会啊,你没有动画是正常的?