News Forums RAIN General Discussion and Troubleshooting AI won't go to waypoint

This topic contains 2 replies, has 2 voices, and was last updated by  ToastDispatch 1 month ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #38668

    ToastDispatch
    Participant

    Hello,

    First time working with RAIN AI and I’m working on a 2D hockey game, like the old NES or NHL 94 games.

    Just trying to get started simply, and my AI won’t go to a waypoint target, here is a shot of my behavior tree.

    I’ve got the move target set to “Center Point” and a Waypoint Target in the heiarchy with the name “Center Point”, but he doesn’t go to it.

    I’m working in Unity 4.6.

    I was working on this a few months ago and followed some pages on the Wiki about Waypoints, but now it seems those pages have been removed from the Wiki?

    Any help would be greatly appreciated, I can’t seem to find any up to date tutorials about RAIN AI and half the pages in the Wiki are missing or not yet added.

    #38672

    Sigil
    Keymaster

    Ok, yes, the wiki is in poor state at the moment, so I recommend heading here and I can help you out.

    So since you’ve been a few months out, make sure you have the latest version of RAIN since a lot of things have been updated/fixed/changed. You can try the RAIN updater, if you have it, but if that doesn’t work you can grab it here or on the asset store.

    So once you are up to date, make sure all of these things are true (this assumes you are up to date):

    • The AI is using the behavior tree you setup on the mind tab (first tab).
    • Make sure Allow Off Graph Movement is set to true on the motor tab (third tab).

    That said, it looks like you have everything setup correctly. I do see multiple “Center Point” GameObjects in your hierarchy, but I don’t think that’d be an issue, as long as the disabled one was disabled when the game started, assuming it was even a Navigation Target to begin with.

    Try selecting the AI while the game is running and open the behavior tree editor. In the behavior tree drop down you can select the top option (Current AI) and it should color the behavior tree based on what is happening. If the Move node is red it means the Allow Off Graph Movement is off and you don’t have a Navigation Mesh. If it is yellow it means it is trying to Move. If it is green it means it thinks it is already at its target.

    If it is yellow, you can go to the navigation tab on the AI (5th tab) you can check the Draw Paths button and see where the AI is trying to go.

    #38709

    ToastDispatch
    Participant

    Thanks for the post, I took a closer look and all those settings were already set, however when creating the new AI Rig I forgot to select the gameObject to use, once I’d done that it started working.

    Thanks again!

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

You must be logged in to reply to this topic.