Photon - Possible to sync CrossFixedInTime Animator State?
Hey,
currently i work on a photon setup. My original 'offline' code uses CrossFadeInTime to switch over the animations. I do this, to sync the weapon with the animation smoothly. However, i run into problems when i try to implement this into the photon framework.
Heres a simple example of my function Fire:
void Fire(){
// Fire Function
anim.CrossFixedInTime("Fire, 0.1f);
}
This works smoothly offline. However, how do i implement this OnSerializePhotonView?
I also tried to replicate it with RPC, basically by doing:
void Fire(){
//Fire Function
photonView.RPC("fireAnim", PhotonTargets.All);
}
void fireAnim(){
anim.CrossInFixedTime("Fire", 0.1f);
}
This also doesn't work, it gives a null reference back when the remote player tries to call the function. Been trying to fix this for a few days, but nothing seems to work. Yes, i attached the animation view component as well. Still, won't play any animation at all over photon.
Thanks in advance.
Your answer
Follow this Question
Related Questions
Photon - Enable MouseLook Script from First Person Controller? 1 Answer
How to add alternate idle directions to a top-down game 0 Answers
How to add alternate idle directions to a top-down game 0 Answers
what's the best way to change animators on a player, in script? 1 Answer
Check what group id you have after being instantiated. (PUN) 1 Answer