- Home /
This question was
closed Mar 25, 2014 at 08:38 AM by
Fattie for the following reason:
Duplicate Question
I want to change the object position random in five particular position only.
I have 5 objects in 5 different positions.if i click on any one of the object i want to change the position of 5 objects like swap the 5 objects.if u know solution plz give suggestion to me.
Comment
You could just store those 5 gameObjects in a array or list and move them around randomly. Like selecting 2 objects from the array/list, switch their positions, and do that a couple of times so that eventually all objects in the array/list have changed their place.
have five "markers" (empty game objects) and pick one randomly, and move it there. if you mean you already have five objects. when one is clicked, randomly pick pairs and swap those say 20 times and that will shuffle them.