- Home /
Unity NavMesh but not NavMeshAgent? (to solve different size agents)
Hi,
What I would like to do is use the Unity NavMesh feature to build a navmesh. I then want agents walking around with a certain clearance (say x). This can be done by setting the radius to x.
However, I ALSO want agents walking around with a smaller clearance. (say .5x). I don't think there is any way that the build in Unity NavMesh(Agent) supports this... I could trick it by setting the radius of the larger-clearance-agent to x, but then the other agents use that distance for collisions too, which I don't want.
So now I'm wondering if there is any way that I could use the NavMesh feature from unity but write my own NavMeshAgent class, to somehow solve this problem. I don't really know how to actually access the navmesh though... Anyone have any ideas on this?
So no one has any thoughts on this? Not even "It can't be done." ?
Answer by m-i-e-c-z · Apr 16, 2013 at 07:09 PM
Hi,
I've found a workaround solution for this problem (I'm also working on a game with both small and large agents). Here is the forum thread in which I've posted the solution:
Hope it helps a bit,
miecz
Answer by Tessa · Jun 07, 2012 at 07:23 AM
Well according to Unity this is the answer:
If you want to use NavMesh layers, go to Edit => Project Settings => NavMeshLayers instead of the normal layers and use NavMesh.GetNavMeshLayerFromName instead of LayerMask.NameToLayer
After playing around with it: Screw Unity, this doesn't solve any of my problems. Yes, you can make different 'layers'. BUT these layers all have the same clearance. And I still can't just USE the navmesh in anyway without using the Nav$$anonymous$$eshAgents.
@Unity - why haven't you made proper video tutorials? why are you making this so stressful for your users + CLIENTS?
Are we the enemy or something? I don't get it.
If you don't want to employ people to do this then why not ask one of your forum moderators to spend an hour or two.
Youtube is free by the way UNITY... funny that "unity" where is the unity?
Look at how many people are stuck having a horrible time trying to get things working. And you just need to spend a few hours, in tern that would save us days. You release a tool or feature then don't bother to show us how we can use it properly for different situations.
Your answer
Follow this Question
Related Questions
CalculatePath often returns wrong results 0 Answers
Player's last location as a Transform 1 Answer
Unity pathfinding - Comparing 2 paths? 2 Answers
How to make AICharacterController able to walk on walls and ceilings? 0 Answers
Navigation Mesh + Doors 0 Answers