Colliding with rectangle

Sorry, it took a while. My first time using direction, i did not know that it could generate random degrees. But it seem to not working when the ball already facing that direction. For example, when the ball already facing east and i hit it with my paddle. Nothing change. I increase my paddle height for testing.


But other than that, all working fine. I change a few blocks because i set Ball.OriginAtCenter to be true.
So, here is how i do it.

I'll try to change few things to get what i want. Thank you for your solution

This discussion might help Projectile Targeting System and Projectile Animations because the X and Y coordinates provided are the lower left corner of the Sprite (not the center) and How do you adjust collision on mit app inventor

Here is as close as I could get, not perfect because the ball sails by the Sprite too many times.

paddle_bounce.aia (8.2 KB) when Ball1 EdgeReached

I had to set Ball1 as centered at X,Y.

Sorry, that thread has a lot of reading, took me a while to understand the problem. ABG solution is quite straight forward, I understand the general idea by comparing their coordinate XY position.

You know you could just make the imageSprite1 to be bigger, then you will have less problem.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.