News › Forums › RAIN › General Discussion and Troubleshooting › Animations not playing.
This topic contains 4 replies, has 2 voices, and was last updated by Hanoble 4 months, 2 weeks ago.
February 20, 2022 at 6:07 pm #36097
I have used rain successfully in the past, but when I recently set up a project with a character I have ran into an issue with animations not playing. The only difference I can see is that the old model I was using (MAX from the asset store used in several of Coder Expo’s examples) has all of his animations included in a single file and children of the model in the Project Hierarchy. My new models on the other hand have the animations in a different file (not children or even in the same location in the Project Hierarchy), but I am still setting up an animator and linking the clips through the AI. Does this not work?
My behavior tree is functional with MAX, but not the other models. All the BT does is selects a random waypoint from a waypoint network and then moves the AI to that location while (attempting at this point) playing a simple walk animation. Any help would be greatly appreciated. Thanks.February 23, 2022 at 8:49 am #36144
RAIN works fine when animations are placed in individual fbx files. Since you are using an Animator, that means you are using Mecanim, and so RAIN doesn’t know anything about your animations - it deals directly with the state machine.
I’d need more information in order to help with the specific problem. Feel free to send a copy of the project if you want us to take a look.February 23, 2022 at 2:41 pm #36154
I was actually using the basic animator, not Mecanim, but I found the problem today. I was missing a selector that apparently was causing the animation to not play, despite the tree running as normal. Below I have attached two trees for anyone else who may run into this issue. The first is the tree where the animation was failing to play (without a selector), and the second the tree where it does play (with a selector). I suppose it is recommended to ALWAYS have a selector before constraints then? I was thrown off track because the tree was reporting that it was running. I am still not sure why it plays the rest of the constraint (the custom action to select a waypoint and the move), so if anyone can clear that up I am curious know. Thanks again for your time Prime.
February 23, 2022 at 6:28 pm #36158
Yes, in most cases you will use Constraints inside a Selector. That’s because when you are using multiple constraints, one of them is bound to fail. That in turn causes the parallel to fail (usually) and reset, which restarts the parallel loop and probably restarts your animations (causing them to either not play or to jitter badly).February 23, 2022 at 8:17 pm #36161
That is most likely exactly what was happening. I was noticing occasionally with some animations the model change into one of the frame poses and lock there or jitter a bit, but it was not very consistent other than knowing something was not right. I have been using RAIN for about a month now and I am starting to get much more comfortable with it, but there are occasionally these weird logic flaws in my brain that stop everything from working Thanks again for the help Prime!
You must be logged in to reply to this topic.