Random object falling diagonally

I’m making a game where you avoid or bump into a red dot as it falls. The red dot is randomly coming down vertically. Please tell me how to make it fall randomly between -45 and -135 degrees.


A force that rotates an object is called a “torque”.

Try moving your object using a torque with an angle in a specific range (in case it gets out of the screen).

Also, did you try rotating the object?

You could use the apply force (angle). Right is 0, down is 90, left is 180 and up is 270. So, if it’s falling, you could pick a random number from 45 to 135.

You could use this with the bounce extension and bounce the circle off the walls.

1 Like