Resize rectangle

Hey,so I need to resize a rectangle when a condition is met. Can I do this? Is there a way to resize a rectangle that is drawn in the draw method() after the fact in an if statement? If something is true then resize the rectangle. Can I do this? Is there a function? I found scale but it doesn’t seem to do exactly what I want.

1 Like

Try making the width and height of the rectangle a variable. Then when the condition is met change the variables to whatever you want.

hmm ok I haven’t thought about that

UPDATE: I made it work by doing that and then teleporting it in the corner and also making the width and height 0 so it basically disappears,well it’s still there but it blends in with the corner and the ball will bounce from the corner anyway so that’s fine. Oh yeah,by the way I am making a brick breaker so I needed a way to remove the bricks as the ball hits them. Thanks a lot! That was a very simple solution that I should have figured out but my brain just turned off and I would have probably spent the whole night searching,so thanks a lot!