Added bound to recast config

This commit is contained in:
Antoine Pilote
2024-07-24 23:59:17 -04:00
parent abcb15a27e
commit a3d652c5e3
3 changed files with 5 additions and 2 deletions

View File

@@ -58,8 +58,8 @@ namespace Nuake {
currentVertexOffset = std::size(vertices);
}
float bmin[3] = { -100.0f, -100.0f, -100.0f };
float bmax[3] = { 100.0f, 100.0f, 100.0f };
float bmin[3] = { -config.Bound.x, -config.Bound.y, -config.Bound.z };
float bmax[3] = { config.Bound.x, config.Bound.y, config.Bound.z };
rcConfig recastConfig;
recastConfig.cs = config.CellSize;
recastConfig.ch = config.CellHeight;

View File

@@ -6,6 +6,7 @@ namespace Nuake {
RecastConfig::RecastConfig(const NavMeshVolumeComponent& component)
{
Bound = component.VolumeSize;
CellSize = component.CellSize;
CellHeight = component.CellHeight;
TileSize = component.TileSize;

View File

@@ -1,4 +1,5 @@
#pragma once
#include "src/Core/Maths.h"
namespace Nuake {
@@ -7,6 +8,7 @@ namespace Nuake {
class RecastConfig
{
public:
Vector3 Bound = Vector3(100, 100, 100);
float CellSize = 0.2f;
float CellHeight = 0.2f;
float TileSize = 10.0f;