제목 그대로 움직이지 않아요

{

public float maxSpeed;

Rigidbody2D rigid;


void Awake()

{

rigid = GetComponent<Rigidbody2D>();

}

void FixedUpdate()

{

//Horizontal Movement

float h = Input.GetAxisRaw("Horizontal");

rigid.AddForce(Vector2.right * h, ForceMode2D.Impulse);


//Speed Limit

if (rigid.velocity.x > maxSpeed) //R

rigid.velocity = new Vector2(maxSpeed, rigid.velocity.y);

else if (rigid.velocity.x < maxSpeed * (-1)) //L

rigid.velocity = new Vector2(maxSpeed * (-1), rigid.velocity.y);

}

}


코드는 이렇게 짰습니다

아래 스피드 리밋 쪽 빼면 잘 작동 하는 걸 보니 거기가 문제인 것 같은데 도와주세요