Closed Vauxvogh closed 2 years ago
Not sure that you want to use animator view to sync animator?
This project syncing animation by send state as a number to other. Then the CharacterEntity
will tells Animator
which is attached to CharacterModel
component to play animation later (try find characterModel.TempAnimator
).
So if you want to use animator view, it has to changes codes
Yes to sync the animator on the characters. Because that's the best way to sync animations of the server is to have an animator view component on the object with an animator. Or else the running animations don't sync they are choppy. But because the photon view component is on the character entity and not the characters, you can't put an animator view on the characters because it requires a photon view which is on the character.
There needs to be away in the character entity script to call the animator view component from characters maybe
You actually can add the component to the character model, but you have to add it to observe list like this:
var view = characterModel.GetComponent<PhotonAnimatorView>();
if (view !=null && !photonView.ObservedComponents.Contains(view ))
photonView.ObservedComponents.Add(view );
Hey thanks Suriyun I'll try this out and get back to you hereSent from my Galaxy
-------- Original message --------From: Ittipon Teerapruettikulchai @.> Date: 8/5/21 9:01 PM (GMT-06:00) To: suriyun-production/battle-io-docs @.> Cc: Vauxvogh @.>, Author @.> Subject: Re: [suriyun-production/battle-io-docs] Animator view on Characters (#52)
You actually can add the component to the character model, but you have to add it to observe list like this:
var view = characterModel.GetComponent
—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.Triage notifications on the go with GitHub Mobile for iOS or Android.
Hey so you cant attach an "animator view component" to "character Entity" because that's not where the animator is, the animator is on each individual character you select. If I put an animator view on each character how can we get the "character entity" to call that "animator view" of the child character to use with the parent "photonview" on the "character Enity". Otherwise animations are not synced.