- Home /
Question by
prismdubai · Nov 12, 2018 at 05:35 PM ·
gameobjectarrayonclickswap
hi, Im new in unity and I'm searching a way to swap two different 2d gameobjects on the same position when its clicked the object 1 to obeject 2.? ,hi guys,
I'm using a playmaker but can't find a better to execute this one.
Comment
Answer by austinsun102 · Nov 12, 2018 at 05:44 PM
So you want to switch object 1 location to object 2 location and then object 2 location to object 1 location?
If that’s what you’re asking you can store object 1 position in a vector 3 and the. Object 2 position in another vector 3 and then you set object 1 position to the vector 3 that stored object 2 position and do the opposite for object 2.
Your answer
Follow this Question
Related Questions
Swap and cycle through game objects using an array 1 Answer
How to remove objects from a list ? 3 Answers
How do you save GameObject[]? 1 Answer
Can't add GameObjects to ArrayList 1 Answer
Keep adding targets to a list 2 Answers