I am creating a simple soccer ball game. The player flings the ball towards the goal. If the ball collides with the goal, the score goes up by 1. It works perfectly fine on Android. Problem arises when it is on iOS. Even if the ball does not touch the goal, the score increases by 1. After debugging, i found out that it has something to do with the goal's X position. Anything more than X=300, it will start detecting that it has hit the goal when the ball goes to the top of the screen. Anything less than 300, it behaves as it should. Now, ideally, I would not want to hardcode the X position of my goal as it would not be in the middle of the screen.
Can anyone shed any light on this issue? Here is what my screen and code looks like.