Jump to content
Sign in to follow this  
IronSight94

AI Stop Before Reaching Waypoint?

Recommended Posts

I want an AI officer to walk up to a table which will initiate a conversation between him and another officer behind the table. But the officer walking up to the table stops about 5 meters from the table. Is there anyway to avoid this?

Share this post


Link to post
Share on other sites

Tell him to doMove table; instead of using a waypoint. Or move the waypoint.

Share this post


Link to post
Share on other sites

using doMove table, he moves to the table but stands 5 meters behind or in front of it. If I move the waypoint I get the same result. Is there anyway to get the AI to stand directly on where the waypoint is placed?

Share this post


Link to post
Share on other sites

or maybe try putting the waypoint 5m beyond the table.

Share this post


Link to post
Share on other sites

I have similar problems, but when ordering AI to move close to a vehicle (didn't solve it yet).

Anyway, try ordering him to move to some point close to the table (for example 1m in front of it), maybe the AI just doesn't like the fact there is already some object occupying the position it's trying to move to.

(you can quickly try by placing a marker somewhere close to the table and ordering the unit to move to that marker position).

If that doesn't help, then i vaguely remember (or maybe it's just wishful thinking) there should be some way to somehow turn off the collision, maybe for some unit, maybe it's global effect, or maybe i really making things up (sorry if i am misleading you, but i really think something like this is possible).

Share this post


Link to post
Share on other sites

CreateVehicle array has a can_collide option which works well for getting objects to intersect, but I don't see a way to use that with movement. Maybe attachTo on the unit to the table? Could be ugly though.

Share this post


Link to post
Share on other sites

I believe your issue is that there is a minimum completion radius distance for the AI which is probably 5m or 10m. If you set any value below that it's ignored and it uses 5m or 10m instead. I'm not sure how you can resolve it other than if you could switch to using a trigger with a large enough radius that the AI will be inside it when 5m away? So you would try and initiate the conversation action from a script on a trigger... but I don't know if that's possible.

Here I am a n00b giving advice, ignore me...

Share this post


Link to post
Share on other sites

I set up the way point so that once the AI reaches it he begins a walking action. The action activates correctly, but he starts walking in place the same distance from the table. It seems that the AI is aware that something is blocking it's path and will only go around it.

Edited by IronSight94

Share this post


Link to post
Share on other sites

I think what kylania suggested earlier, move the AI or table, works best. I forgot I had this problem in a cutscene I made, and finally used setPos on the AI when the camera isn't looking :D

Share this post


Link to post
Share on other sites

Do they get closer if you setpos to the ID's number in the editor? and place the table on the same ID#? Just an idea.

Share this post


Link to post
Share on other sites

Is it something else interfering that is NOT the table?

Move your dude and the table somewhere 'safe' like the middle of the road. It will be away from other environments and objects. See if it works there. If it does then it might be a pathing problem in/around the table location. Is your table indoors (Arrowhead)?

Share this post


Link to post
Share on other sites

Finally got it to work! I played around with the waypoint's position for a while and I got the guy to get reasonably close enough to the table. Thanks so much for all the help! :)

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×