Hey I have been looking for a way to swap 2 objects place with each other, but haven’t found anything that does that.
Lets say there is a board with 5x5 squares on it(the squares are 1x1). On every square there is a gameobject. What I want is when I click on one game object, I can then click on one of the others to swap their place with each other.
If anyone knows of a tutorial that deals with this kind of stuff, please tell me.
Transform t = targetGameObject.transform;
gameObjectToMove.transform.position = t.position;
or, on the GameObject,
transform.position = targetTransform.position;
I don’t have much knowledge when it comes to scripting, if it isn’t to much to ask, could you elaborate a little on that?