Discuss Scratch
- Discussion Forums
- » Suggestions
- » you should have a -bounce- block as well as a  -if on edge bounce- block as otherwise you have to make complicated scripts
        ![[RSS Feed] [RSS Feed]](//cdn.scratch.mit.edu/scratchr2/static/__5b3e40ec58a840b41702360e9891321b__//djangobb_forum/img/feed-icon-small.png)  
- pvz_pro
- 
                             Scratcher Scratcher
500+ posts
you should have a -bounce- block as well as a -if on edge bounce- block as otherwise you have to make complicated scripts
no support, their are too many ways to bounce
                        
                        
                    - Sigton
- 
                             Scratcher Scratcher
1000+ posts
you should have a -bounce- block as well as a -if on edge bounce- block as otherwise you have to make complicated scripts
Please don't necropost guys 
Sigton
                        
                        
                    
Sigton
- 1MatsuLover
- 
                             Scratcher Scratcher
500+ posts
you should have a -bounce- block as well as a -if on edge bounce- block as otherwise you have to make complicated scripts
Please don't necropost guysReporting this topic to be closed because of this.
Sigton
- elim2020
- 
                             Scratcher Scratcher
14 posts
you should have a -bounce- block as well as a -if on edge bounce- block as otherwise you have to make complicated scripts
I think it would be a good idea. 
                        
                        
                    if touching [sprite v]would be good, as @cutekids100 said. otherwise, it would be
if touching <>
- Ebezz
- 
                             Scratcher Scratcher
16 posts
you should have a -bounce- block as well as a -if on edge bounce- block as otherwise you have to make complicated scripts
point in direction (((-1) * (direction)) v)
- Ebezz
- 
                             Scratcher Scratcher
16 posts
you should have a -bounce- block as well as a -if on edge bounce- block as otherwise you have to make complicated scripts
< yolo?>
- DaEpikDude
- 
                             Scratcher Scratcher
1000+ posts
you should have a -bounce- block as well as a -if on edge bounce- block as otherwise you have to make complicated scripts
bloop
                        
                        
                    Because they seem to be cropping up, let me make an offtopic post to clear up some misconceptions about the bounce block…
It's very difficult to make a general “bounce” block, because what it does is reflect the sprite by mirroring its velocity across the line normal to the surface it hits. (Sorry, it's kind of hard to be exactly clear about what it does, so I'm trying to be specific).
However, it's very likely that this block would work imperfectly, at least for bitmap sprites, because the normal line calculated would be more of an “average” normal line than the actual line.
That's not the only problem, of course - the other problem is the question of what to do when the sprite is intersecting (not merely touching the edge of) the other sprite, and what to do when it's touching or intersecting multiple sprites.
The ‘if on edge, bounce’ block is comparatively simple - it merely means that if the sprite is touching or intersecting an edge, reflect across the line perpendicular to that edge in the middle of the sprite, which is really easy to do.
(The reason intersection works for the edge and not for sprites is because the edge is a single line - it's easy to define where the reflection line is, which is straight in the middle of the sprite. However, if it is intersecting a generally shaped object, you also have to calculate the normal line - and where to calculate that is based on where it is touching, which is ambiguous.)
P.S. If you would like to discuss the bounce block more, please make a new topic or find an old one (I'm pretty sure there is at least one old one you can use).
- stickfiregames
- 
                             Scratcher Scratcher
1000+ posts
you should have a -bounce- block as well as a -if on edge bounce- block as otherwise you have to make complicated scripts
bloopNot just difficult, but rejected. The wording of the rejection suggests a bounce off [sprite v] block is still open for consideration, but that's a different suggestion.Because they seem to be cropping up, let me make an offtopic post to clear up some misconceptions about the bounce block…
It's very difficult to make a general “bounce” block -snip-
- Discussion Forums
- » Suggestions
- 
            » you should have a -bounce- block as well as a  -if on edge bounce- block as otherwise you have to make complicated scripts ![[RSS Feed] [RSS Feed]](//cdn.scratch.mit.edu/scratchr2/static/__5b3e40ec58a840b41702360e9891321b__//djangobb_forum/img/feed-icon-small.png)  
![[RSS Feed] [RSS Feed]](http://cdn.scratch.mit.edu/scratchr2/static/__5b3e40ec58a840b41702360e9891321b__//djangobb_forum/img/feed-icon-small.png)






