- Home /
Getting a Movable Area from NavMesh
Alright, so I have an issue with what I'm trying to achieve and haven't quite been able to find, and/or come up with, a solution.
I'm using Unity's NavMesh and NavMesh Agents. And I have a range that my characters can move within. Meaning that I want them to be able to move a 1-meter distance from their spot, as an example, and I want to highlight in some way all the areas through the NavMesh that they can reach by traveling 1-meter. I've looked and I can't seem to find a solution to my problem shy of a brute force method that would take up way too many CPU cycles and am hoping there's a better way of doing this.
If there is still confusion as to what I'm asking, please let me know and I will try and clarify to the best of my ability.
Any help is much appreciated, even if you have some thoughts but not full ideas I think an open forum is the best. THANKS!
Just bumping the question back up......Really would like to know if anyone has thoughts on this.
Unity Navmesh component: https://github.com/Unity-Technologies/Nav$$anonymous$$eshComponents
Yeah....to the best of my knowledge of these components they do not contain what I'm looking for. If I'm wrong here, that's fantastic, but please supply more information than a github link.
Technically, you can't get exact area mask because there is no data to represent it visually and codely. But you can tell if a position you choose is belong in which area.
And in your case you want to figure how to use Edge Navmesh. Just light up the area around player that is walkable.
2nd Option most expensive one is you use areaPathCost around player like 8 direction around player or possible path player can go. And choose the cheapest path as light color(walkable) dark as (heavy path walk).
Or 3rd option is cheap, heavy-work way as navmesh is pre-baked. You just have to build your own custom area mesh that light up when player is around.
Your answer
Follow this Question
Related Questions
Getting a navmeshagent back on a navmesh. 1 Answer
How do I get agents to avoid each other? 0 Answers
Navmesh y-axis 1 Answer
How to use Unity's pathfinding system without NavMeshAgent controlling my character? 1 Answer
How to prevent NavMeshAgents from colliding when warped to same position? 0 Answers