Hi,
I’m making a TPS multiplayer with Photon but i’m stuck trying to synchronise all my animations over the network.
Animations in the Base Layer are corrected synchronized but I’ve got a throwing animation in a second Layer wich is not.
are you synchronizing the layer weights aswell? I always forget to check if the layer weight on the remote object is set properly and the animation just doesn’t play if the weight is 0
HI Oliver,
I’m sorry but I’m nub, How should I do this ? Because I set the second layer to 1 and my problem still the same :
my animations works but I don’t see the throwing animation of an other player in the network.
ManitoBart, thanks for the tweet, but sadly I’ve not used photon enough to be of any real help.
There are a few dedicated (and official?) threads on the forum by the photon folks. Try to find them and post there is one suggestion. Search for photon in either the search box in the header or google. :-/
Another is to join the photon forums and ask your photon questions there.
I would recommend asking on the Photon forums also, I’m not sure why this would not be sync’d - but in case Olivier is correct, you should check that. If you’re not syncing the weights - then you’ll never see the animation. Weight defines how much of the above layer’s animation is played - if you haven’t touched on this or can’t check, chances are you’ll find other challenges in making a networked multiplayer game.
It’s really tough to give any type of feedback based on the information you provide.
How are your animators setup?
What code are you using to trigger the animation? Locally and Remotely?
Did you check if the layer weights of remote objects are also set to 1? Open the animator view, select a remote object (one that another client controls, not the unity editor) and inspect the layer weights of this object. It shows up in the animatior automatically if you’ve selected the GameObject with the Animator component attached to it.
Hi, I don’t know why there’s no documentation on the PhotonAnimatorView class.
When is it going to exist?
Also, could you design the PhotonAnimatorView class to support children Animators instead of having to put a PhotonView and PhotonAnimatorView on the children?
@MidgardDev : We can at least take a look about children.
However, we get a lot of requests for features and in the end, we can’t implement everything. There is the code of the PhotonAnimator. We give this out deliberately, so you can extend and modify it as you need to. Go and make use of that.
Don’t get me wrong: I appreciate the input. We never thought about the child animators and we will check this out when Oliver has some time again.
I just can’t promise anything at the moment.
Thanks for the nice reply
You don’t need to add a PhotonAnimatorView AND a PhotonView to the children. Since the new version you can add multiple components to be observed by a single PhotonView. Just add a PhotonAnimatorView to each Animator you want synchronized and add those components to the observed list of the original PhotonView.
Adding child support to PhotonAnimatorView would make it very complex and difficult to read because in that case the PhotonAnimatorView and the Animator would be on different GameObjects. I feel like having the PhotonAnimatorView on the same GO as the Animator makes it easier to debug in case something goes wrong. It would also be very difficult to keep any references to child animators if you start moving them around in the objects hierarchy. By having them on the same GO this will never be an issue.