Migrating from Apex Path. Some problems I am facing

I am migrating from Apex Path to AStar but running into problems.

My game has a feature where if a monster hears a noise to goes to inspect what the noise came from.
The noise could be in a different room with a door blocking entry.
The monster should try to path to the noise(player in this case) and when it try’s to pass through the door(it can’t because there is a collider stopping it)
it hits a trigger which tells the monster to either open the door(if smart enough and door is unlocked) or start to attack the door.
Once the door is opened or destroyed it continues to path to the noise.

I have it working great in my old Apex path version using attributes(Unity Tutorial Apex Path Attributes Part 2 - YouTube).
But I can’t seem to get the same thing implemented using AStar.

I figure the best way to do it is to use “GraphUpdateScene”.
I have watched the video(Graph Updates and Tags - YouTube),
but I have tried and I can’t seem to get it to work.

I can’t even get it to stop walkability at all.
I have “Modify Walkability” checked and “Walkability Value” unchecked.
I have tried using a collider as the bounds and also “points”.

When I run it the monster and player can just walk right through the GUS section.

What is the best way to implement this functionality in AStar?


Hi

Have you looked at the included example scenes called “Door1” and “Door2”? They might be helpful to you :slight_smile:

Thanks for your reply.

I have looked at those examples(many times).
And while they do work in that scene they don’t work in mine.
I have spent many hours trying to get the tags working in my scene.
I have tried using the same exact settings used both on the agent and on the pathfinding component.

Any ideas why the tags would not be working? Are there some hidden rules that may be stopping the tags from working?

Note: Also, when I change the debug Graph Coloring from “Areas” to “Tags” it does not show anything in my scene. But when I do that in the “Door1” scene I can see the paths/tags as expected.

So if you use a normal GraphUpdateScene component, it will update all nodes which have centers strictly inside that shape. For navmesh-based graphs (as opposed to grid graphs like Apex Path uses) this can be tricky because the triangles are not necessarily shaped the way you need them to be.

If you want to make a part of the graph unwalkable, I would recommend using navmesh cutting instead. That’s much more robust for that purpose. See Navmesh Cutting - A* Pathfinding Project

This might also interest you: RecastMeshObj - A* Pathfinding Project