diff --git a/Source/Engine/Navigation/Navigation.h b/Source/Engine/Navigation/Navigation.h index 29d21cffb..140f32f77 100644 --- a/Source/Engine/Navigation/Navigation.h +++ b/Source/Engine/Navigation/Navigation.h @@ -2,36 +2,12 @@ #pragma once -#include "Engine/Scripting/ScriptingType.h" -#include "Engine/Core/Math/Vector3.h" +#include "NavigationTypes.h" class Scene; #define NAV_MESH_PATH_MAX_SIZE 200 -/// -/// The result information for navigation mesh queries. -/// -API_STRUCT() struct NavMeshHit -{ -DECLARE_SCRIPTING_TYPE_MINIMAL(NavMeshHit); - - /// - /// The hit point position. - /// - API_FIELD() Vector3 Position; - - /// - /// The distance to hit point (from the query origin). - /// - API_FIELD() float Distance; - - /// - /// The hit point normal vector. - /// - API_FIELD() Vector3 Normal; -}; - /// /// The navigation service used for path finding and agents navigation system. /// diff --git a/Source/Engine/Navigation/NavigationTypes.h b/Source/Engine/Navigation/NavigationTypes.h new file mode 100644 index 000000000..e06794a90 --- /dev/null +++ b/Source/Engine/Navigation/NavigationTypes.h @@ -0,0 +1,57 @@ +// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved. + +#pragma once + +#include "Engine/Scripting/ScriptingType.h" +#include "Engine/Core/Math/Vector3.h" + +/// +/// The navigation system agent properties container for navmesh building and querying. +/// +API_STRUCT() struct NavAgentProperties +{ +DECLARE_SCRIPTING_TYPE_MINIMAL(NavAgentProperties); + + /// + /// The radius of the agent used for navigation. Agents can't pass through gaps of less than twice the radius. + /// + API_FIELD() float Radius = 34.0f; + + /// + /// The height of the agent used for navigation. Agents can't enter areas with ceilings lower than this value. + /// + API_FIELD() float Height = 144.0f; + + /// + /// The step height used for navigation. Defines the maximum ledge height that is considered to still be traversable by the agent. + /// + API_FIELD() float StepHeight = 35.0f; + + /// + /// The maximum slope (in degrees) that is considered walkable for navigation. Agents can't go up or down slopes higher than this value. + /// + API_FIELD() float MaxSlopeAngle = 60.0f; +}; + +/// +/// The result information for navigation mesh queries. +/// +API_STRUCT() struct NavMeshHit +{ +DECLARE_SCRIPTING_TYPE_MINIMAL(NavMeshHit); + + /// + /// The hit point position. + /// + API_FIELD() Vector3 Position; + + /// + /// The distance to hit point (from the query origin). + /// + API_FIELD() float Distance; + + /// + /// The hit point normal vector. + /// + API_FIELD() Vector3 Normal; +};