# Saving Current Orientation

<span style="font-weight: 400;">As mentioned in the overview, we need to save local player's current orientation to know how to sync their position as well as apply positions of all other players. </span>

<span style="font-weight: 400;">Create a new object, call it Origin, and create a new Udon program for this object. The program should have a public Transform variable that can be set, and an event that when sent, will copy the position and rotation of the transform variable and set itself to that position and rotation. </span>

[![Origin UdonGraph](https://i.imgur.com/4VDpix3.png)](https://i.imgur.com/4VDpix3.png)[![Origin UdonSharp](https://i.imgur.com/5T7dkhy.png)](https://i.imgur.com/5T7dkhy.png)[![Origin CyanTrigger](https://i.imgur.com/xojB5ON.png)](https://i.imgur.com/xojB5ON.png)

<span style="font-weight: 400;">Now we need to update our original buttons to set the transform variable and send the event to this origin object. After teleporting the player, add logic to set the transform variable to the transform of the orientation we are going to. Once set, send the event.</span>

[![Updated Button UdonGraph](https://i.imgur.com/H4QYW9w.png)](https://i.imgur.com/H4QYW9w.png)[![Updated Button UdonSharp](https://i.imgur.com/G0t351g.png)](https://i.imgur.com/G0t351g.png)[![Updated Button CyanTrigger](https://i.imgur.com/4Ij26sS.png)](https://i.imgur.com/4Ij26sS.png)

<span style="font-weight: 400;">It is a good idea to set the origin’s transform to the same position and rotation as the first room orientation. This way, by default, all players will appear in the first room, instead of any other arbitrary location.</span>