Hello community, I have been working on a ping pong game on and off for about a year, never really finishing it. The last time I made changes to it it mostly worked. However, recently it has encountered a problem that my friend and I have noticed. The “if on edge, bounce” block doesn’t work properly as the ball keeps teleporting to random places(I have not used go to random position anywhere) and it basically ignores a lot of my code. I have tried making it simpler and removing things that may make a difference but nothing works. I need serious help with this project.
The problem is not with the code, it is with the costume of the ping pong ball. The center of the costume is very off, which results in the ball appearing to teleport after it bounces off the edge. Once you center the costume, the problem should be fixed
Hmm ok thank you guys, will will do that
I am a big noobie, I don’t have a lot of experience with block code, this is a joint account so my friend is on it mostly(he is actively working on the math blocks program)
Oh ok
How do I make sure it is exactly center
If you go into the costume editor, you should see a button with a crosshair (a circle with two lines going through it). If you press that button, you can set the center of the costume
Thank you ![]()
Or, run switch to costume (new costume ([pixels V] of costume [your costume V]) width ([width V] of costume [your costume V]) height ([height V] of costume [your costume V])) to automatically center