I'm working on pathfinding and my character often doesn't take direct routes to the target (shown here as a red circle), even though the floor is generated from a completely flat plane (minus the middle column).
As you can see it takes the long way around the left and right side of the middle column even though it can clearly go through those areas. This may have to do with bad path weighting but I don't know.
Is there a way to force the goblin to always cut the direct path?
This is the shape/navmesh code, if it helps:
// Set ground navigation shape
shape = Shape::Box(0, 0, 0, 0, 0, 0, 28, 16, -0.1);
room->SetShape(shape);
shape->Release();
room->SetNavigationMode(true);
// Set column navigation shape
column1=Model::Load("Models/column1.mdl");
shape = Shape::Box(0, 0, 0, 0, 0, 0, 0.3, 0.3, 4);
column1->SetShape(shape);
shape->Release();
column1->SetNavigationMode(true);
world->BuildNavMesh();