Search Unity

Generating a random spawn on the X axis in a 2D game

Discussion in 'Scripting' started by MKGstudios, Sep 20, 2014.

  1. MKGstudios

    MKGstudios

    Joined:
    Sep 20, 2014
    Posts:
    2
    Hi, I'd like to know if someone would know how I could do a random spawn for a prefab without its clones touching each other and have them at a certain minimum distance from one another. The prefabs are obstacles my character has to jump over... I kinda tried something with the OverlapPoint, but can't seem to figure it out correctly. Anyways, thanks in advance for any answer!