Can somoan help me i making a game where there is an ai and you are the ball and you need to play pong the bat is the ai
thise is the code used withe Quick engine:
ballMove = function() collision = Quick.spriteCollision(ball, ai)
if keyboard.DOWN or gamepad.DOWN then ball.vy = -100 end
if keyboard.LEFT or gamepad.LEFT then ball.vx = -100 end
if keyboard.RIGHT or gamepad.RIGHT then ball.vx = 100 end
if not collision and ball.grounded then ball.vy = 100 score += 1 end
end
i dont understand why the score goes up even when i said if not collision and ball.grounded