why is this while loop infinite?
this is crashing unity:
(complete beginner btw literally just started messing around with code 2 days ago)
If i click on an object with a cube or sphere tag, generate some random values, destroy the object I clicked on, genereate a new random spawn position using the random values. WHILE the new spawn position is colliding with an existing object, generate a randomSpawnPosNew, and set randonspawnPos equal to that, once the random spawn position is not colliding with any other objects, instantiate the object that we clicked on.
6 Replies
your not generating a new random position, your just reusing the exact same position
oh right cus the random values are the same
whats a good way to generate a new position?
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
i actualy treid that
and it failed
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
tis true
i follow you
ive been changing things