- Home /
Question by
JRulkiewicz · Aug 13, 2014 at 07:33 PM ·
2darraypositionrandom
Load random gameobject to specific coordinates (2D)
I have a few GameObjects with children set up as various platforms (think 2d platformer).
These GameObjects are named "Platform1", "Platform2", "Platform3", etc. Each object has various 32x32 sprites and are 320 wide from end to end. I want to be able to add these in to an arrary, pull 5 at random and line them up end to end. Since they're 320 pixels wide (and I don't want them to overlap) the first one would start a x=0 and y=0, the second one would start ar x=321 y=0, the thrid would start at x=642 y=0, and so on.
Comment