Hello,
I am helping a student create a game like air hockey. We need help programming the ball (puck) to bounce off another ball (striker).
We were trying to use the blocks from the mini-golf game where the ball bounces off the obstacle, but it does not seem to be working.
We are trying to use the following blocks:
When ball2 collided with
do if other = ball1
then set ball2 heading to 0 - ball2 heading.
We would appreciate any help. Thank you!
ABG
2
This sample app includes ball on ball angle math:
This is what I did for my MiniPool game:
*** this photo is draggable.Just drag this photo to your code design zone.
2 Likes
Thank you both SO much! I greatly appreciate you helping me out.
East
5
Hi, I am a student who is trying to do the same thing but is there any simpler way to do this?
Blocks already there, just drag and drop it to the block editor.
when I drag it into the blocks area and drop it in, it dissapears. Any idea why?
TIMAI2
8
You should click once (or twice) on the image to maximise it, then you can drag it to your blocks editor.
1 Like