Discuss Scratch

kaadhya
Scratcher
4 posts

Ball passing through paddle in ping pong game

I was making a ping pong game when the ball suddenly started passing through the paddle. I tried many times and the ball still kept on going through the paddle. Please fix this bug. Thank you!
Tornado1013
Scratcher
31 posts

Ball passing through paddle in ping pong game

Can you send a link to the project?

Last edited by Tornado1013 (April 3, 2023 02:26:51)

kaadhya
Scratcher
4 posts

Ball passing through paddle in ping pong game

Yeah… here! Click this to get the link!Just click the green flag twice, click ping pong, and the second time the ball bounces on the paddle, the ball goes right through. Ignore the other stuff, they don't work.
coIIide
Scratcher
100+ posts

Ball passing through paddle in ping pong game

kaadhya wrote:

Yeah… here! Click this to get the link!Just click the green flag twice, click ping pong, and the second time the ball bounces on the paddle, the ball goes right through. Ignore the other stuff, they don't work.
It's because you're turning 90 degrees straight into the floor. I have a solution.
Go to this script:
foreveriftouchingPaddlePongthenturn90degreestheotheroneshreiforgorwhattheywere Change it to:foreveriftouchingPaddlePongthenBounceoffpaddle A custom block (run without screen refresh)defineBounceoffpaddlesetPrevious Ytoypositionsetyto-180ifonedge,bouncesetytoPreviousY
That worked for me, and I hope it works for you!

Last edited by coIIide (April 3, 2023 20:40:19)

kaadhya
Scratcher
4 posts

Ball passing through paddle in ping pong game

coIIide wrote:

kaadhya wrote:

Yeah… here! Click this to get the link!Just click the green flag twice, click ping pong, and the second time the ball bounces on the paddle, the ball goes right through. Ignore the other stuff, they don't work.
It's because you're turning 90 degrees straight into the floor.
Thank you so much!
coIIide
Scratcher
100+ posts

Ball passing through paddle in ping pong game

kaadhya wrote:

coIIide wrote:

kaadhya wrote:

Yeah… here! Click this to get the link!Just click the green flag twice, click ping pong, and the second time the ball bounces on the paddle, the ball goes right through. Ignore the other stuff, they don't work.
It's because you're turning 90 degrees straight into the floor.
Thank you so much!
Not sure if you saw but I gave you a solution with blocks above.
Aditrito
New Scratcher
1 post

Ball passing through paddle in ping pong game

Hey guy's, I'm having the same problem with my ping pong game too can you please help me?
deck26
Scratcher
1000+ posts

Ball passing through paddle in ping pong game

Aditrito wrote:

Hey guy's, I'm having the same problem with my ping pong game too can you please help me?
Best if you create your own new topic and share the project.

Powered by DjangoBB