Random Positions changing

Hey all!

I was wondering if It could be achieved to randomly change rigidbodies for example… They need to be like 3 groups with two cubes each… Changed random positions… There are other combinatios but you get the idea… See attached pictures…



I think a combination of Random.Range, Switch and transform.position should do the trick.

Get a random number, check if it has already been selected (to avoid having 2 groups at the same position), if not, use the switch to find out what position it should go to (transform.position = Vector3(x,y,z) you want) then mark this position as used.

Include an option to reinitialise the position used when you want to re-shuffle.[/code]

Thanks for respond… But I don’t know anything at this engine since I was using another engine… I only want to know if this is possible and to totally move with this one… If someone could make the simplest example thanks a lot!