mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-04 11:35:06 +03:00
Now taking into account navmesh volume position
This commit is contained in:
@@ -368,7 +368,9 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
NavManager::Get().BuildNavMesh(RecastConfig(component));
|
||||
auto recastConfig = RecastConfig(component);
|
||||
recastConfig.Position = volumeTransformComponent.GetGlobalPosition();
|
||||
NavManager::Get().BuildNavMesh(std::move(recastConfig));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,8 +58,8 @@ namespace Nuake {
|
||||
currentVertexOffset = std::size(vertices);
|
||||
}
|
||||
|
||||
float bmin[3] = { -config.Bound.x, -config.Bound.y, -config.Bound.z };
|
||||
float bmax[3] = { config.Bound.x, config.Bound.y, config.Bound.z };
|
||||
float bmin[3] = { config.Position.x - config.Bound.x, config.Position.y - config.Bound.y, config.Position.z - config.Bound.z };
|
||||
float bmax[3] = { config.Position.x + config.Bound.x, config.Position.y + config.Bound.y, config.Position.z + config.Bound.z };
|
||||
rcConfig recastConfig;
|
||||
recastConfig.cs = config.CellSize;
|
||||
recastConfig.ch = config.CellHeight;
|
||||
|
||||
@@ -8,6 +8,7 @@ namespace Nuake {
|
||||
class RecastConfig
|
||||
{
|
||||
public:
|
||||
Vector3 Position = { 0, 0, 0 };
|
||||
Vector3 Bound = Vector3(100, 100, 100);
|
||||
float CellSize = 0.2f;
|
||||
float CellHeight = 0.2f;
|
||||
|
||||
Reference in New Issue
Block a user