I know this is possible but I am incredibly new to Godot, I am making a pong-style game and I need to reset when the ball goes off screen, how do I check the ball’s position in an if statement?
This is what I was trying to do, but it doesn’t work, If anyone can help I would be really thankful!
Equality check is done with a double equal sign ==.
One equal sign = is assignment.
However, due to the nature of floating numbers, your position might never be exactly what you expect it to. Therefore it’s better to check if it’s equal or greater (or less) than, rather than purely equal when you’re checking for boundaries.
This is done with >= or <= respectively.
I suggest you to also check this tutorial series that teaches the basics: