8
8
897755280242019-11-16 02:19:42
C++ / C#
89775528024, 2019-11-16 02:19:42

How to make snowballs fall from the top randomly in unity 2d?

It is necessary so that they randomly fall from the top of the screen5dcf32778063e501104695.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
2
2CHEVSKII, 2019-11-16
@2chevskii

Need a script for it

So write.
Why repost the question? You didn’t describe a damn thing in the previous one, where you were asked what exactly didn’t work.
The simplest task.
Using Random.Range(xMin, xMax) you select a spawn point beyond the upper boundary of the visible zone, spawn the "snowball" object, hang a MonoBehaviour on it, move it down in Update, and check in LateUpdate if it has gone beyond the lower boundary of the visible zone, if yes - destroy, if not, then wait for the next Update.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question