Please internet help, i cant figure what i’m doing wrong, i have tried several helpful guides to sync my triggered Animator
The Animator works with the trigger anim.SetTrigger("walk");
but when i try switshing to trigger the networkanimator, nothing happens. No triggering of animation and no sync over network.
This is my “cleaned” OVRplayer script:
using UnityEngine;
using UnityEngine.Networking;
[RequireComponent(typeof(CharacterController))]
public class OVRPlayerController_TEST : NetworkBehaviour
{
public GameObject Walk;
// Animator anim;
void Start()
{
// anim = Walk.GetComponent<Animator>();
}
public override void OnStartLocalPlayer()
{
NetworkAnimator netAnim = Walk.GetComponent<NetworkAnimator>();
netAnim.SetParameterAutoSend(0, true);
Walk.GetComponent<NetworkAnimator>().SetParameterAutoSend(0, true);
}
public override void PreStartClient()
{
NetworkAnimator netAnim = Walk.GetComponent<NetworkAnimator>();
netAnim.SetParameterAutoSend(0, true);
Walk.GetComponent<NetworkAnimator>().SetParameterAutoSend(0, true);
}
void Update()
{
if (OVRInput.Get(OVRInput.Button.One))
{
Walk.GetComponent<NetworkAnimator>().SetTrigger("walk");
//anim.SetTrigger("walk");
}
}
}
Please help this noob to fullfill my dream of a working Multiplayer “Polygon Nightmare” game FREE for all!
Polygon Nightmare