/
redgpu
/
ezEngine
Обзор
Документация
Войти
/
redgpu
/
ezEngine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
Code/EnginePlugins/AiPlugin/Navigation/Components/NavMeshObstacleComponent.h
34 строки
1 KB
x0r04rg
NavMeshObstacleComponent (#1228)
07 мар 2024, 13:58
Не верифицирован
07 мар 2024, 13:58
4f6e2d0
Код
Авторство
О чём код?
#pragma once #include <AiPlugin/AiPluginDLL.h> #include <Core/World/Component.h> #include <Core/World/ComponentManager.h> using ezNavMeshObstacleComponentManager = ezComponentManager<class ezNavMeshObstacleComponent, ezBlockStorageType::Compact>; /// \brief Represents a dynamic obstacle on a navmesh. /// /// Automatically notifies the navmesh that sectors overlapping this object must be rebuilt. /// /// Attach this to objects that are dynamically spawned, but need to affect the navmesh, blocking or unblocking pathing. /// For example: a wall - obstacle component will make sure the navmesh is carved around it, so all path queries will /// be blocked by it or go around it. /// Another example could be a bridge that connects two navmesh islands, allowing a direct path between the two. /// /// Currently, only works with static game objects with relevant physics geometry. class EZ_AIPLUGIN_DLL ezNavMeshObstacleComponent : public ezComponent { EZ_DECLARE_COMPONENT_TYPE(ezNavMeshObstacleComponent, ezComponent, ezNavMeshObstacleComponentManager); public: ezNavMeshObstacleComponent(); ~ezNavMeshObstacleComponent(); protected: virtual void OnActivated() override; virtual void OnSimulationStarted() override; virtual void OnDeactivated() override; public: void InvalidateSectors(); };