Idiots Guide to moving

DaveMorgan

New member
Hi,

Total newbie here.

Been playing with Behaviour Designer today on an existing project.

Have a very simple tree I created from this (
) tutorial which sort of works in my environment.

Issues I am having are:

"Moving Towards" never ends. Most likely this is due to the object the AI is moving towards is obstructed hence a collider is stopping it. The example I have is an AI moving to an appliance within a kitchen area. They can get close to the appliance, but never actually reach it (due to it being on another solid object). How would you deal with this sort of case? Is there a "close enough" method?

The next challenge I have is with the animations. The NavMeshAgent appears to be picking up the speed etc from Behaviour Designer because I have tested it with different speeds, BUT the AI doesnt turn nor animate - only slides. The only other components I have left on the character are a rigidbody a capsule collider and the animator itself (with apply root motion selected).

Other AI's in the scene are exactly the same but running on an "simulation AI script" and move correctly. Its this script I'm actually seeking to deprecate.

Any help appreciated!
 
"Moving Towards" never ends. Most likely this is due to the object the AI is moving towards is obstructed hence a collider is stopping it. The example I have is an AI moving to an appliance within a kitchen area. They can get close to the appliance, but never actually reach it (due to it being on another solid object). How would you deal with this sort of case? Is there a "close enough" method?
Move Towards doesn't use pathfinding so I would instead use the Seek task. This will then allow you to correctly avoid objects.

The next challenge I have is with the animations. The NavMeshAgent appears to be picking up the speed etc from Behaviour Designer because I have tested it with different speeds, BUT the AI doesnt turn nor animate - only slides. The only other components I have left on the character are a rigidbody a capsule collider and the animator itself (with apply root motion selected).
This page explains how you can add animation: https://opsive.com/support/documentation/behavior-designer/syncing-animations/
 
Thanks for the info - I'd been through that before but didnt really understand the animation stuff - have worked that out now.

Background:

I have a model of a 2 story house and am getting the AI to move to specific appliances in the house.

Tried "Seek". AI turns and walks, but heads upstairs for items that are located downstairs. Possibly due to their height above the ground. (ie a microwave in the kitchen has the AI going upstairs and standing directly above it).

Am trying "Seek" with adjustments to the target position (x,y,z). Don't want to have to change the actual appliance values as all these are automatically generated from a building design.
 
Ok,

So I reset everything and tried again. (screen shot below)

I started out testing the walking to make sure my animation is correct... so had a wander - thats all ok.

But it doesnt "see" any of the objects I choose. In this situation the object is right in front (literally the bench in front of him!), and well within the "viewing circle" - and yes, its the right mesh type.

If I replace the "Can See" with a "Seek" then he goes upstairs and positions himself directly above the object????
 

Attachments

  • Untitled.png
    Untitled.png
    446.6 KB · Views: 12
Sorted it out - must have been something clashing because I deleted the project and reimported it and it is now working......

My only concern is that I still dont know why... but if I find out I'll post it in.
 
For that situation you can use conditional aborts. Take a look at this setup:

 
Top