flip the position on a Vector2

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Tentamens

Hi!

So I’m making a multiplayer game where I was the player to always be on the right and the enemy on the left. But how would I “Flip” the positions to the other side of my map/screen.
I’ve already tried dividing my -1 and put the center of the map at 0,0 but than works to no avail

If your able to help big thanks ahead of time!

:bust_in_silhouette: Reply From: SteveSmith

Swap the x coords of the Vector2.x of the two avatars. They will then swap sides.