- Home /
Question by
Simbosonic · Jan 18, 2015 at 10:02 PM ·
2d game
Random objects created and flying through scene
Hi, I'm making a 2d scroller and need random objects (from a list depending on the stage) to appear from the right, fly through the scene and off the left. If they hit the player then game over.
How do I get objects to appear randomly and fly through ? They can fly straight or bump into each other to change course . I get rigid body.2d etc but not the random/flying ing part.
Thanks
Comment
Answer by hav_ngs_ru · Jan 19, 2015 at 04:09 PM
just create a script that will Instantiate objects from prefabs at random positions out of screen and add forces to it to make it fly :)