News Forums RAIN General Discussion and Troubleshooting AI not moving towards waypoint (following 10 minute tutorial)

This topic contains 26 replies, has 9 voices, and was last updated by  prime 2 years, 3 months ago.

Viewing 15 posts - 1 through 15 (of 27 total)
  • Author
    Posts
  • #5965

    inac
    Participant

    Started with a more complex scene with the 10 minute tutorial that so far has taken over 2 hours, as I try to troubleshoot why the waypoints are not being followed.

    I’ve reduced my AI to just a cube with box collider and rigidbody. It isn’t following the waypoint route at all. Not sure what is wrong:

    http://www.filedropper.com/test_13

    #5975

    prime
    Keymaster

    Take your move node and put it inside the waypointpatrol node. It needs to be a direct child.

    #5980

    inac
    Participant

    The tutorial did not indicate the parenting.

    Also, next issue - character stops at first waypoint and doesn’t continue.

    #5988

    prime
    Keymaster

    Waypoints have changed since we put together the tutorial. Make sure you do NOT have your move node set to repeat forever.

    #6019

    kdoom
    Participant

    hey there, look at the tips below which said :

    Patrol Route
    Iterate through a set of Waypoint Route patrol points. blablabla….

    Quick fix to make your patrolling works : change the move action to repeat until success.

    Hope it helps

    #6024

    prime
    Keymaster

    @kdoom - I generally recommend repeat Never. If you repeat until Success, then you might get stuck in a failure case.

    #6118

    Brian Falkner
    Participant

    I am having the same issue. I set the move action as a child of the waypointpatrol node. Changed move to repeat never. Have the Move Target Variable set as moveTarget in the waypointpatrol node. Tried setting the Move Target on the move node as moveTarget and as “moveTarget”. “moveTarget” gets me past the move node to the animation node, but the AI just walks in place.

    #6121

    prime
    Keymaster

    Using 2.0.8?

    #6133

    agamand
    Participant

    I’m using 2.0.8 and had the same problem. Thanks to the information so far I managed to get my character to move to the closest waypoint node where it stopped moving.

    Turns out the problem was due to me setting transform.position.z explicitly in a script, causing the character to be unable to reach the waypoint properly, and that got it stuck.

    My advice is check that your other scripts do not interfere with the movement.

    #6166

    Brian Falkner
    Participant

    The only script I have is a health script from following the tutorial. Only got through the first one. lol. I can make the AI do pretty much anything, except follow a simple waypoint route. I have the latest version. Project is a new project. Not sure what could be causing this. The AI walks in place, so it is getting to the animation. I will paste in a drop box link. Maybe you can see something I am not. It’s most likely something very simple.

    • This reply was modified 2 years, 3 months ago by  Brian Falkner.
    #6169

    Aaron Mueller
    Participant

    @BrianFalkner,
    Are you using RAIN’s Navigation Mesh? Or, are you just using the Waypoint Route or Waypoint Patrol?

    If you are just using a Waypoint Route, see this post I made earlier: http://rivaltheory.com/forums/topic/upgrade-to-2-0-7-and-updating-waypoint-patrol/page/2/#post-6156

    In a nutshell, if you are not using a Navigation Mesh generated by RAIN, try in the Motor section of your NPC’s AI and look toward the bottom. You should see three checkboxes:
    Allow 3DMovement
    Allow 3DRotation
    Valid Path Required

    By default, the Valid Path Required option was checked. When I ran my upgraded to 2.0.7 solution (it’s the same behavior for 2.0.8), my NPC would animate walking in place. If I went into Scene view and dragged him away from that point, he’d find a path back to his starting point.

    If you uncheck the “Valid Path Required” box, you should see your NPC move along the Waypoint Path. In my case, that was a good start, but my NPC would get stuck at the first Waypoint Patrol node he came to.

    By checking the “Allow 3DMovement” he began going back and forth between the WaypointPartrol nodes.

    Hope that helps you out some. I was baffled for a while on it.

    • This reply was modified 2 years, 3 months ago by  Aaron Mueller.
    #6171

    Brian Falkner
    Participant

    @Aaron Mueller - That did it. Removed Valid Path Required, checked allow 3DMovement and 3DRotation. AI is now wandering around the waypoints. I see you want to have the Move node as a child of the Waypoint node and the animate run parallel with the waypoint node. I had the animate node as a child of the waypoint node along with the move node and he just skates around like that :p

    I appreciate the help on that one. Just now got dropbox loaded up on this computer. It’s new and I forgot I hadn’t done that yet.

    #6172

    Brian Falkner
    Participant

    and my name is spelled wrong. lol

    #6188

    Brian Falkner
    Participant

    Now that the AI moves throughout the waypoints correctly, I added the die animation. added in the constraint node. Set health > 0. I checked several times to make sure it is set up exactly like the videos. The problem is the AI dies first. If I make a change and then put it back it goes through the BT again and the AI starts walking. I have the constraint set to repeat never. If I change that to forever the AI starts going to the way points, but the Die animation stops working when I set health to 0. It does stop walking tho. It’s like the Health is not getting in fast enough. If that makes sense.

    #6189

    prime
    Keymaster

    Where are you setting health > 0?

Viewing 15 posts - 1 through 15 (of 27 total)

You must be logged in to reply to this topic.