frame

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Register

How to create random position and movement for object?

How should I make an object to be positioned at a random point on the screen and move in a random direction with any angle. It should also collide with the border of the screen and again move in a random direction. How can I do all this?

Comments

  • Use the random block from the Logic and math section. Run the output of the random block into a filter block from the same section. Use the filter block to choose what type of numbers you want and now the filter block will randomly out put true or false depending on the number it recieved.
Sign In or Register to comment.

flowlab.io

| make games in your browser
@ 2017 Flowlab.io, All rights reserved.

Contact us

Get In Touch