I get what your saying, but I’m not sure how to implement in my code, So could you (if possible) break down the different factors of the code I’m looking for and post them here?
And if you need to, I can post the code I’m using for the ball
I have a question:
You haven’t implemented any walls in the game right?
Because that’s the problem in the end, it won’t work.
In your case, in order for the ball to fall down again, you need
a RigidBody2D. So you have to use gravity so that the ball can fly or fall downwards. And then I think you need a bounce so that the ball flies up again.
Unfortunately I can’t help yet,
I just tried to recreate your game to understand why the code doesn’t work. My code only works because there are walls in my game. I’ll just send you the link to my project, you’re welcome to import it into Godot and take a closer look at everything I’ve done, but as I said, if you don’t want to install walls, my code is useless.
Unfortunately, I can’t break down exactly why something works or doesn’t work with my code because I’m still a beginner and haven’t understood everything yet.
IT WORKS, The ball can now change it’s direction when hitting a paddle and can sense walls too.
I’ll try and see how to understand the code, and tweak it to what I need, but for now, I think I have my solution, Thank you very much
I might come back again and make another post if there is an error that I’m experiencing with what I’m making, but other than that, Thanks
Also how would you fix the bug where if you touch the ball in the middle of the paddle, it moves slowly, but when you touch the ball at the edge of the paddle, it goes really fast?