HI , i changed the code in the " C++ Fundamentals: Game Programming For Beginners " , where we create an axe and a circle that moves around
here is the code
axe_y += direction;
if (b_axe_y > height || axe_y < 0)
{
direction = -direction;
}
i’m checking if the lower bound of the rectangle is hitting the edge of the window, but all it does is make the image jitter and not go back in the same direction, i tried changing the syntax of the condition to check and everything works fine but when i write the code in this way it makes the rectangle jitter, anyone have a solution for this???