How to sync mecanim animations?
Options
ive been trying super hard to get this working but whatever i do i cant fix it. i have this script:
using System.Collections; using System.Collections.Generic; using UnityEngine; public class playerblend : Photon.MonoBehaviour { private Animator anim; // Use this for initialization void Start () { anim = GetComponent<Animator>(); } // Update is called once per frame void Update () { if (anim == null) { Debug.LogError("Animator not present in" + transform.name); } float x = Input.GetAxis("Horizontal"); float y = Input.GetAxis("Vertical"); Move(x,y); } private void Move(float x, float y) { anim.SetFloat("VelX", x); anim.SetFloat("VelY", y); } }to change my players blend tree in game, thus making him walk and all that good stuff. the problem is, i cant sync this over the network. can someone help me on this?
0
Best Answer
-
You can find some Tutorials if you search for it.https://doc.photonengine.com/en-us/pun/current/demos-and-tutorials/package-demos/mecanim-demo5
Answers
-
bump0
-
You can find some Tutorials if you search for it.https://doc.photonengine.com/en-us/pun/current/demos-and-tutorials/package-demos/mecanim-demo5
-
yeah, but when i add a animatorview to my character, it adds a photonview despite the parent already having one0
-
Hi @LeytonMate,
Thank you for choosing Photon!
can you move the Animator to the same GameObject as the PhotonView?0 -
I tried editing the photonanimatorview to get the photonview from the parent, would this work?JohnTube said:Hi @LeytonMate,
Thank you for choosing Photon!
can you move the Animator to the same GameObject as the PhotonView?0 -
Yes, it can do the job but you'll need to do it every time you update PUN or exclude PhotonAnimatorView.0