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.

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

    Hanoble
    Participant

    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.

    #36144

    prime
    Keymaster

    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.

    #36154

    Hanoble
    Participant

    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.

    Non-Working Tree

    Working Tree:

    #36158

    prime
    Keymaster

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

    #36161

    Hanoble
    Participant

    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!

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.