Case Status
Log In


Home ยป Add-ons»Photon Networking»Photon DemoWorker Sample»Photon DemoWorker Animation Sy…
Community Wiki

Photon DemoWorker Animation Synch Fsm

get or set the player animation. 

This is a critical Fsm.

Synching the player animation

The variable "Animation (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 "animation ( 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 the player animation state", in there we get the animation state and set the the variable "animation ( synched)" to match. If we are not the owner, we move to the state "Set the state", and we first get the variable "animation ( synched)" and we set the animation property via the PlayMakerThirdPersonControllerProxy component ( notes below on this)  for the player to reflect changes.
Note: Playmaker can not work with Enums currently, and the thirdPersonController stores the animation state as an enum. To work around this limitation and NOT change the thirdPersonController, we have build a simply proxy called PlayMakerThirdPersonControllerProxy" that essential converts enums to int back and forth. This is the only case where we had to write some scripts in order to port this game to playmaker. If you encounter such problems with other controllers, do not hesitate to contact us on the forum, we will be happy to assist you in building these proxies. 

Photon Actions used:


Last modified on 5/22/2012 2:58 AM by User.

  • RSS Feed