Nested if statement only runs once. I don't know why.

Hi, I’m rather new to programming and unity. I’ve run into a problem that I think should be really simple to fix but I just don’t know how.

I’ve been trying to make a simple pong game. Currently working on trying to create a system so that when the ball hits certain area of the paddle the ball will get a force added to it which will make the ball bounce with some “english” on it.

So I thought I would accomplish this by making a comparison between the ball’s x coord and the paddle’s on collision. the paddle is 3 wide, if the ball hits while it’s x coord is greater than -1 but less than 0 of of the paddle’s x coord, the game should recognize the ball as hitting the left side of the paddle and apply some force to the ball so that it will have “english”.

Whenever I run this script my statement print("hit the left zone"); in the nested if statement only shows up in my console once per launch of the game, no matter how many times i hit the ball on the left side of the paddle.

Can somebody help me find out why I am only getting 1 instance of print("hit the left zone"); in my Debug log. I find this strange because I can get infinite instances of Debug.Log("Ball Hit South Paddle!"); to show up in my debug console.

I am just trying to make sure the ball is being recognized as hitting the correct part of the paddle so that I can move on to figuring out what type of physics interaction I want.

Here is my collision function
`

    void OnCollisionEnter2D(Collision2D col)
    {

        if (col.gameObject.tag == "south_paddle")
        {
            Debug.Log("Ball Hit South Paddle!");

            //trying to find out if the ball hits the left side of the paddle
            if (ballPos.x >= south_paddle.south_paddlePos.x - 1 && ballPos.x <= south_paddle.south_paddlePos.x)
            {
                print("hit the left zone");
            }

        }

thanks for reading

EDIT-------

allright, so I tried all of the suggestions that were mentioned here.

I changed out that random print, to Debug.Log.
I Included parentheses in the nested "if" to better define it
I tried OnCollisionStay2D, no debug reports

So, I’m still at a bit of a loss here. I’m not sure how can make my game report its recognition of the ball hitting the left side of the paddle.

I do appreciate everyone’s suggestions though, I thought at least one of them might work, but sadly not.

Could be because you have not put brackets around the two arguments either side of the &&
Try this :

void OnCollisionEnter2D(Collision2D col) {
 
    if (col.gameObject.tag == "south_paddle") {
    
        Debug.Log("Ball Hit South Paddle!");

        //trying to find out if the ball hits the left side of the paddle
        if ((ballPos.x >= south_paddle.south_paddlePos.x - 1) &&
            (ballPos.x <= south_paddle.south_paddlePos.x)) {
            
            Debug.Log("hit the left zone");
        }
    }
}