Help with code! Angles


I need help, it might sound bad but I can’t figure out the angle that would go to the top right of you added a move forward to it, anyone know xD?


We’re is the thing placed?


Also there’s a project on my account called zero finder that might help


Here I don’t know, I can’t find the problem but I’ll post my project and I’ll see if y’all see a problem, it’s my first real project in months so don’t judge.

So basically I’m trying to make it come back and bounce off the walls, for the most part, it works but there’s a few spots that mess up, if it doesn’t work for you the first time just keep resetting until it does, the ball does go that far after you hit it with the platform just so I can test it right now


Some times it gets stuck in the corners and sometimes when it hits the top of your phone, it goes to a side rather than coming down, the numbers are the angle of the ball being detected.
I think one problem is, it’s still moving forward even when the angle is changed so it’s not updating. If anyone can find a solution please tell me @POMTL thanks :smiley:


And that is we’re I can no longer help for I no longer have hopscotch


Lol why t you in the forums xD


@CreationsOfaNoob if your in could ya help me? The code is extremely simple so you shouldn’t have a crazy hard time figuring it out if you read it for a second.


Because I can


So you are trying to make the ball bounce off the walls?


Yea, but i dont know why they won’t rip


I think taking the angle * -1 should work. Try that.


Which one? I don’t know what one I need to do thst too


The object that bumps the wall. I might also not work at all.


There 4 controllers, a left and right bump off the edges below 180 Y and 2 controllers abover 180 Y, the ones below 180 keep the bounce up, if it hits above 180 Y the bounce takes it down. I can’t fogure out an idea to stop the moving forward tho, I feel like that’s what not making the angle of the ball update after hitting a wall. If that gets fixed then no matter what, the ball will change directions after hitting a wall but if you look at the angle distinguisher, it dosent always change after hitting a wall, I can’t figure out why.


you have tagged me over 3 times today. chill


I have a pretty simple method to have a ball bounce off the walls. You are free to use it if you’d like

Check the code in this project:

This is the bit you’d need. Set an angle for the ball & set it to move forward. The formulas in the ‘When self is touching Edge’ are all that’s needed to bounce off the 4 screen edges


Assuming that you didn’t change the angle or flip beforehand.
Top right: 45°
Decrease to go closer to the right, increase to go further left, just keep it less than 90° and more than 0°.

I use angles a lot in trail art. Here’s the basic rule of thumb I use.
Every object before adding any other code like angles or flip starts off facing right, parallel to the screen.
Positive turn numbers bring it upwards/counterclockwise and negative numbers bring it down/clockwise.