get or set the player rotation. The variable "Rotation (synched) is serialized across photon network.
This is a critical Fsm.
Synching the player rotation
The variable "Rotation (synched)" is defined and serialized across photon network within the Variable synch repository fsm.
If we are the owner of this object ( that it represents OUR player), then we MUST set the variable "Rotation ( synched)", this is our duty so that other instances ( your player representation on other running applications) can watch for changes.
So if we are the owner, we move to the state "Get player rotation", in there we get the rotation of the gameObject and set the the variable "Rotation ( synched)" to match. If we are not the owner, we move to the state "Set player rotation", and we first get the variable "Rotation ( synched)" and we set the rotation of this gameObject. We do not lerp or try to adapt the value, since the controllers rotates the player straight without smooth interpolation, we don't need to bother with doing more.
Photon Actions used:
- Photon View Is Mine( in state "IsMine?")