Bullet Randomize orientation

Hi Everybody,

I am exploring more ascpects of Ready maker an d I want to change ramdomly the orientation of an object in the bullet behavior… :shushing_face:

I know I can generate a random angle, but how to to make a new orientation with it ?

Thank’s in advance for your proposals.

Take care of you.

3 Likes

https://ready.app.link/IvtAmDXgm6

This code will randomly set the crackers position when it senses touch down.
Maybe this will help you.

You can use variables to move a sprite and control speed with movement blocks instead of using Bullet behaviour.

https://ready.app.link/efcFfHQpm6
This link has a rocket that moves forward and rotates its angle clockwise random -45 to 45 degrees every 3 seconds.
The red heart makes a clone of the rocket every 3 seconds until 10 clones have been made.

3 Likes

Hello @Suzzy-Grey,

Thank’s for reply.

It’s an interesting approach for sprites…

Remember this little boy running (Gif animation work perfect now), I want he runs left to right across the screen and when it reaches the right border, he turns his face to left and run to the left. When you use the behavior stay in screen he made it, but it’s like a moonwalk, he don’t turns his face like a standard object. This is why I use the bullet behavior instead and turn in the direction I want when it have reached the attempting position. That’s work but for the return I wanted to change randomly the direction of the boy, I can only change this direction manualy.

Sorry for long explanation…But I have not found a way for that

Have a good day.

2 Likes

Have you an idea @Ready ?

2 Likes

You can make a border around the screen.
Make a frictionless no gravity ball bounce around the screen. Set a gifs position to the ball.
When ball collides with right wall, set gif horizontal flip yes.
When ball collides with left wall, set gif horizontal flip no.

Set ball to solid off and walls to solid on.
This should work.

3 Likes

This perfect solution Suzzy-Grey! :+1: Also you can try use for this a global variable, counter or random number behavior…ect. For example you can make this more randomly:

Project link: https://ready.app.link/jPU12T5rq6

2 Likes

Hello @Suzzy-Grey & @Ready,

Thank’s for your solutions they work fine. :+1: :wave: :wave:
They have a different effect depending the solution you choose.

I have made a mix with a boy running…

https://ready.app.link/6zkiCh8Hq6

Have a good day :blush: :blush:

3 Likes