-
Randomize position while preventing overlapping
I want to write an expression that will generate a random position everytime I duplicate a shape layer, which is a small dot. So far, what I have is:
seedRandom(index,true);
x = random(-40, 40)
y = random(-1500, 0);[x,y];
This works fine, however I will be making hundreds of little dots, and do not want any of them to overlap. Is there a way to incorporate something into the expression to say that if the random return matches within a certain range of the other layers, to start over, and keep repeating until it finds a new unique position? I feel there is, but this is delving into a whole part of expressions that I am unfamiliar with.
Sorry, there were no replies found.