News Forums RAIN General Discussion and Troubleshooting BasicAnimator Breaking AI?

This topic contains 4 replies, has 2 voices, and was last updated by  squeakywafflez 1 year, 3 months ago.

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

    squeakywafflez
    Participant

    So, I have a simple AI that doesn’t do anything but patrol this little area that I set up for him, and he works perfectly, except when I try to animate him using the “BasicAnimator” and not the “MecanimAnimator” in the animation tab, it breaks completely and he does nothing. Even if he doesn’t have an animation behavior.

    whuts da deal?

    #31373

    Sigil
    Keymaster

    Are you getting any particular errors in the console? I did some quick tests just to be sure (Create AI, Basic Motor, Basic Animator, behavior tree with a move in one direction) and it works as expected.

    One gotcha is if you increase the size of the animation states array but don’t actually click any of the “Create Instance” button you’ll get a null reference exception (and it halts the AI). Maybe that is the issue?

    That last one has been fixed internally (out with the next release).

    #31490

    squeakywafflez
    Participant

    I do get an error

    NullReferenceException: GetRef
    RAIN.Animation.BasicAnimator.InitAnimationState (RAIN.Animation.BasicAnimatorState aState)
    RAIN.Animation.BasicAnimator.InitAnimations ()
    RAIN.Animation.BasicAnimator.AIInit ()
    RAIN.Core.RAINAIElement.AIInit (RAIN.Core.AI ai)
    RAIN.Core.AI.AIInit ()
    RAIN.Core.AIRig.AIAwake ()
    RAIN.Core.AIRig.Awake ()

    But yes, I did click “Create Instance”

    #31522

    Sigil
    Keymaster

    Ok, that error clears it up a bit. I had to play around with things but I was able to get that error when I assigned a non-legacy animation to the BasicAnimator.

    We aren’t very clear on that I’m afraid, but if you are using Generic or Humanoid animations you should use a MecanimAnimator. If you are using legacy animations, go with the BasicAnimator.

    #31530

    squeakywafflez
    Participant

    :\ Alright, I was afraid of that.
    I guess I’ll have to learn this whole mecanim thing and how it works, then.
    Thank you for helping!

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

You must be logged in to reply to this topic.