I want to use Navmesh in interiors but there are a problem with doors.
Here is a video to show:
I’m using UTscout.uc, and the bots are extending from Pawn.uc, and using controllers extending from AIController.uc.
The Paws are using drawscale=0.5 and the cylinder is 15x45.
First problem, the navmesh are not generating paths through the doors. I had to modify UTscout.uc, adding this lines:
NavMeshGen_StepSize=15.0
NavMeshGen_MinEdgeLength=15.0
Now there are paths through doors, and fill the interior, at the cost of bigger times to build.
Second problem, the bots are not passing through the doors. The FindPath() are not working with them.
In the video, the girl (the bot) draws a debug sphere green when is moving using navmesh, and red when is not using (using movetoward).
You can see in the video part 1 that the girl cant find a path when the player is in the interior of the room.
I have tried to change a lot of things, pathsizes in the scout, values in GetNextMoveLocation, and giving some values to NavMeshPath_SearchExtent_Modifier… not working none.
Then I have tried to reduce the pawn drawscale, from 0.5 to 0.25, and it works. The small bot pass the doors. Also I had to change this in the scout:
PathSizes(3)=(Desc=Common,Radius=10,Height=44)
(original Radius are 100). (I don’t know why are affecting the “Common” instead “Human”).
So tried to return to pawn drawscale to 0.5 and set the “common” radius to 5. Not worked. Radius = 20, not worked.
I don’t understand very well how the navmesh works.
I have found a solution that works, but I don’t like very much.
Just before calling FindPath(), the cylinder radius of the bot are divided by 2, from 15 to 7.5. A timer restore the normal radius 0.01 seconds later.
The FindPath() then makes the bot can pass through the doors. You can see in the part 2 and 3 in the video.
But I don´t like this solution, so the question is, are some way to get the same result with some magic values in the scout or any way to pass to the navmesh the half of the cylinder radius without change the cylinder in game each time?
(The awesome scify laboratory is a test map called “MegaTile”, donwloaded from here: http://www.torfrick.com/ . Using dynamic lights in this video and loaded as stream level on the island map).