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.
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!
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 ).
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.