Ever wondered why your Animator breaks and stops updating position and rotation when there is also an UdonBehavior on the same game object?
Basically, udon is set up in such a way that instead of applying the position and rotation directly to the game object (ApplyRootMotion), it feeds the values into Udon itself in the Animator’s targetPosition and targetRotation variables, so udon can get the result of the animation and decide what to do, usually Transform SetPositionAndRotation.
Technically, with the same idea, you can use the Animator’s position and rotation tracks to provide per-frame data for your udon script to do anything with: you don’t have to simply set localPosition/localRotation on the transform.
Anyway, TL;DR: Please follow one of these links depending on which type of udon you are using.
Please see here for an updated fix for Udon Graph It’s recommended to use the linked program and copy and paste it into an existing udon program!
The following only worked on the old 2018.12 SDK which supports subgraphs…
Well, if you actually just want to apply the position and rotation from your animation without processing it through udon, take the attached ApplyAnimatorRootMotion subgraph and throw it into a Sub Graph node.