Discuss Scratch

spike43884
Scratcher
79 posts

A Major pain for rotation this bug is, but a easy quick fix with a new block

for games such as pong, the ball must ‘bounce’ of the paddle, but you currently must do rotate randomly and it will lots of times make the ball go through the paddle simple fix: A bounce block, it takes the angle that the object goes in, in comparison to the other object, and mirrors it (you would also need a angle line on sprites so if you make it the angle is different sprites you can select the center of the sprite and then rotate the line)


Horrible Bug
Nice Fix
Sonickyle
Scratcher
1000+ posts

A Major pain for rotation this bug is, but a easy quick fix with a new block

So…
Is this a suggestion, or a bug report? I don't understand the post.

No I don't make projects anymore. I left some time ago.
I only check the forums every now and then, but other than that consider me retired.
dracae
Scratcher
1000+ posts

A Major pain for rotation this bug is, but a easy quick fix with a new block

All you need it math.
If the ball is coming down onto the paddle, you want it to change from -135 to 135.

ll O
ll L
ll

If the ball is coming up onto the paddle, you want it to change from -45 to 45.

ll _
ll |
ll O

So…

Last edited by dracae (July 6, 2013 14:19:19)


mitchboy
Scratcher
1000+ posts

A Major pain for rotation this bug is, but a easy quick fix with a new block

Check out my profile. I have a Pong project that bounces off the paddle based off the direction it's going (I'm too lazy right now to share a link).

Capsicum annuum.
spike43884
Scratcher
79 posts

A Major pain for rotation this bug is, but a easy quick fix with a new block

dracae wrote:

All you need it math.
If the ball is coming down onto the paddle, you want it to change from -135 to 135.

ll O
ll L
ll

If the ball is coming up onto the paddle, you want it to change from -45 to 45.

ll _
ll |
ll O

So…
…no that would not work most likely. becuase if the paddle moves. then the ball goes through it. bouncing it back. repeating you action.
dracae
Scratcher
1000+ posts

A Major pain for rotation this bug is, but a easy quick fix with a new block

spike43884 wrote:

dracae wrote:

All you need it math.
If the ball is coming down onto the paddle, you want it to change from -135 to 135.

ll O
ll L
ll

If the ball is coming up onto the paddle, you want it to change from -45 to 45.

ll _
ll |
ll O

So…
…no that would not work most likely. becuase if the paddle moves. then the ball goes through it. bouncing it back. repeating you action.
Just use math bro.


Mokat
Scratcher
100+ posts

A Major pain for rotation this bug is, but a easy quick fix with a new block

MATH FOR THE WlN

Powered by DjangoBB