Problem with Mechanim

NodeCanvas Forums General Discussion Problem with Mechanim

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #9153

    Hello.
    I have a scene set up where I have a GameObject with a Animator on. On the Animator I trigger the transition to an animation with a Trigger.
    When I start the scene and trigger the Trigger manually, the animation runs as expected. However when i trigger the Trigger from Node Canvas the transition happens in the Animator window(and the animation plays in the animator window). But the GameObject doesnโ€™t move.

    I hope this makes sense and that there is a simple solution to the problem. If I need to clarify anything please ask and I will respond ASAP.

    EDIT:
    When I enable the transition in NC, I see that “Apply Root Motion” on the Animator turns from a checked checkbox to “Handled by Script”. Don’t know if this makes a difference.
    Br.

    #9157
    Gavalakis
    Keymaster

    Hello,

    I tried replicating the problem but didnt manage to do so.
    Animator transitions are happening correctly using a SetTrigger and the Animator component never changes from Apply Root Motion to Handled By Script (No action does that).
    So I wonder if you have some other Animator related stuff going on apart from NC?

    Please send me a simple replication project so that I can take a look at what’s going on.
    Thanks!

    Join us on Discord: https://discord.gg/97q2Rjh

    #9156

    Hello.

    I’v attached mailed you an unitypackage containing a minimal scene that reproduces the issue. I did not mention it earlier because I did not think it was important, but the transition between nodes checks for an event. And I saw today when I made the repro, that it only happened when I set it to check for event.
    Anyway attached package should show the problem ( you might have to set the FSM parameter on the GUI object ).

    Br.
    .

    #9155
    Gavalakis
    Keymaster

    Hello,

    Thanks for emailing the package. Helped to pinpoint a bug.
    Please open up AgentUtilities.cs and remove lines 87-89 (OnAnimatorMove).
    This is also why you very correctly spoted that the Animator reads Controlled By Script.

    Thanks. Nice catch ๐Ÿ™‚

    Join us on Discord: https://discord.gg/97q2Rjh

    #9154

    Thanks for the rapid response with a solution ๐Ÿ™‚

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.