- Home /
Physics.Raycast does not work On NotWalkable Areas Of Navmesh.
Hey Every One, I am having a issue that i spawn a gameobject through UI Button and position it with raycast on mouse movement and it has Navmesh Agent on it. Also my ground surface has navmesh baked on it and have some NotWalkable Areas. All is good except that when i spwn gameobject while passing over NotWalkable area then it start its working from back of the NotWalkable area not from mouse position. Please answer my question . I search almost two days but cant find anything. Thanks in Advance.
I couldn't understand your problem I guess, does it walk to the edge of walkable area and teleport to non walkable area when you click outside of walkable area (wich is common mistake). or something else?
can you explain more, maybe with a video or screenshots.
Not sure if I understood it correctly, but I think it might be a case of the Nav$$anonymous$$eshAgents not being able to leave the Nav$$anonymous$$esh. They're generally not able to leave that space I believe.
Answer by adriant · Dec 19, 2017 at 01:09 PM
The "Not Walkable" area type is special because it carves a hole in the NavMesh, it doesn't just change the area type locally. You can define your own area type which your NavMeshAgents can avoid. More info about custom area types can be found here https://docs.unity3d.com/Manual/nav-AreasAndCosts.html .
Your answer
Follow this Question
Related Questions
AI Player Jerky Movement - Overcoming Obstacle 0 Answers
Raycast problems in my AI 1 Answer
Player's last location as a Transform 1 Answer
Allow navmesh agents to be pushed off navmesh 1 Answer
Physics.Raycast 2 Answers