- Home /
Question by
ondrasovka123456 · Oct 22, 2021 at 12:14 PM ·
networkingmultiplayerphotonswapswapping
Swap player positions
Hello, I am new to multiplayer in unity and i have one problem i want to make function witch will swap positions of two players, but i dont know how. Any Ideas?
I am using Photon multiplayer in 2D.
Comment
Answer by logicandchaos · Oct 22, 2021 at 02:16 PM
Make a Vector3 temp; temp=player1.transform.position; player1.transform.position=player2.transform.position; player2.transform.position=temp;