Overriding bone rotation during animation

Options
Hey!

I'm a little bit stuck trying to have a manual bone rotation synced over the network while an idle animation is playing. The bone rotation is overrided in LateUpdate loop, however it is only visible for the local player. If the idle animation is not playing, the bone rotation gets synced and is visible for everyone.

I checked that the rotation value is changing for all players like it should.. it's just not visible for other players, just like if the bone rotation was in Update loop instead of LateUpdate.

Any idea to help me to proceed is highly appreciated.

Thanks!
Markus

Comments

  • S_Oliver
    S_Oliver ✭✭✭
    Options
    Could you share your code with us?
  • mjo
    Options
    I have a balance script which updates the player's balance meter. The players can affect each others balance by punching them. The punch is done via RPC, it works and the balance meter is updated correctly.

    In the same script, at the start of game, the script is getting the back bone:
    if (photonView.IsMine) {
                backBone = this.gameObject.transform.GetChild (0).transform.GetChild (0).transform;
            }
    

    Then, in LateUpdate loop, back bone's eulerAngles are set to match the balance meter's value:
    void LateUpdate () {
            if (photonView.IsMine) {
                backBone.eulerAngles = new Vector3 (backBoneRotationX, backBone.eulerAngles.y, backBone.eulerAngles.z);
            }
        }
    

    Back bone is child of a player object and each player objects has transform view, animator view and smooth synch. I already tried add transform view into back bone itself with no luck. Also tried to implement IPunObservable in balance script, dragged the script into parent's observed components and then sending and receiving eulerAngles (OnPhotonSerializeView), again with no luck.