animator trigger not synchronizing

So I have an attack trigger and it is not synchronizing properly with the animator view,
i made sure the "set trigger" script is before the animator view and i should work but it doesn't...
i tried to search the forum for solution but couldn't find one.

thanks is advance for the help

Comments

  • anyone? please?
  • Hi @yosi1202,

    Thank you for choosing Photon!

    I assume you read the documentation page here.
    Also check out other discussions in the forum by using search feature e.g. query: "animator trigger".
    I think this post for instance could be useful.

    What PUN version do you use?
  • @JohnTube Thanks for the reply

    yes i read the documentation.
    yes i searched the forum.
    yes i read this post.

    non solved it...
  • Hi,

    Can you make a screenshot showing your inspector stack of components and how they are setup?

    - where do you actually set the trigger in your code? the component where you set the trigger must be before the proxy, can you confirm this?


    Bye,

    Jean
  • @jeanfabre

    I am setting the trigger in the "MagePlayerPvp" script, in "UpdateMove()" function witch is called in the "Update()" function,

    the code:

    if (Input.GetMouseButtonDown (0) && stamina >= 10)
    {
    attackTimeTemp = Time.time;
    animator.SetTrigger ("attack 0");
    }

    the inspector:



    and yes i tried to copy the animator view removing and pasting it again...
  • Hi,

    I am having trouble also here, so let me try to find a way around this, I'll get back to you when I have something working.

    you can do one thing if you are in a rush. swap your triggers with regular boolean parameters. then it persist for at least one frame, because you have to manually raise your bool parameter to true and to false the next frame, this way it works.

    the problem, so you understand is that when you raise a trigger, Mecanim doesn't keep the parameter value to true for a whole frame, it's only in a portion of the frame, and likely not even till the end of a frame, hence why we struggly to catch it. in Unity 4 I found a way, and it was working for awhile in previous version of Unity 5, but with 5.6 it seems it's getting more difficult to get it working. I managed few times, by redoing the prefab so that the order, but I haven't found a definitice guide on how to make it work 100% every time you build such prefab.

    Bye,

    Jean
  • yosi1202yosi1202
    edited June 21
    dammit i know i shouldn't have upgraded to unity 5.6 :(
    It will really help me if you could find a solution within the next 1-2 weeks...
    please let me know if you find a solution
  • edited 12:54AM
    I'm having a problem replicating a Trigger in 5.5.2f1. Photon Animator View is at the bottom. What's weird is my Die trigger works fine but the Respawn is never triggered on others.

    https://hastebin.com/nixisegoqu.cpp

    Some additional info from more testing:
    I flagged the Death and Respawn triggers over and over very fast on my editor and the other client saw all of the changes in the animator no problem.
    For some reason it's only when using RPCs that it is somehow causing issues.
Sign In or Register to comment.