Commit Graph

19 Commits (master)

Author SHA1 Message Date
elsid b0b6c48a88
Add clarifying comments to detournavigator coordinates conversion functions 12 months ago
clang-format-bot ddb0522bbf
Apply clang-format to code base 2 years ago
elsid 05b54cbfb8
Cull navmesh objects by scene bounds
If object is too big iteration over all tiles covering it can take too much
time. Limit bounds to a square around a player position to cover only tiles
that will be present in navmesh based on max tiles number option.

Each object is associated with a set of tiles its present in. Culling can
reduce this set but it has to be update when bounds change position. Do this
in TileCachedRecastMeshManager::setBounds updating the set and adding/removing
objects to the corresponding CachedRecastMeshManagers.
3 years ago
elsid 1a52a2a029
Clamp tile position 3 years ago
elsid 7ea5aa250b
Revert "Cull navmesh objects by scene bounds"
This reverts commit b0ef20c303.
3 years ago
elsid ecc654a369 Limit and filter navmesh input (#5858) 3 years ago
elsid 01c712d5f1
Split navigator settings into subtypes
Mostly to distinguish settings that affect properties of the generated navmesh.
3 years ago
elsid 5db4898bec
Fix tile bounds scaling
OscillatingRecastMeshObject::update should be called with tile bounds in real
coordinates not in navmesh. But proper scaling was done only in
RecastMeshManager::getMesh and RecastMeshManager::updateObject used tile bounds
in navmesh coordinates.

Add a new function to create tile bounds with proper scaling and pass correct
value into RecastMeshManager constructor through CachedRecastMeshManager
constuctor from TileCachedRecastMeshManager member functions.
3 years ago
elsid 24b802b3d8
Simplify adding water to recast mesh
Remove redundant computations and conversions.
3 years ago
elsid 753767d6d9
Store only water shift
Rotation is not used.
3 years ago
elsid 84d6dea277
Inscribe physical bounding box into navmesh agent cylinder
To disallow too narrow navmesh for a bounding box.
4 years ago
elsid 39c0ce9ddf
Build limited path for far destinations
When distance between start and end point is greater than max radius of area
possibly covered by navmesh there is no way to find path via navmesh. Also if
distance is greater than cell size navmesh might not exists withing mentioned
area because cell is not loaded therefore navmesh is not generated. So minumum
of these values is used to limit max path distance. Assuming that path
actually exists it's possible to build path to the edge of a circle. When
actor reaches initial edge path is built further. However it will not be
optimal.
4 years ago
elsid 4983684fda
Fix implicit int to float conversion warning 4 years ago
elsid b9f21ec81a
Use custom steps size to make smooth path depending on half extents 6 years ago
elsid c95cea414c
Support water for NavMesh 6 years ago
elsid 4aba0fa85f
Limit number of NavMesh tiles to add by distance from player tile 6 years ago
elsid d2fd9abd51
Split RecastMesh into tiles 6 years ago
elsid ed3a255f65
Do not use NavMesh to find changed tiles 6 years ago
elsid fafba8ea0c
Use recastnavigation to find path 6 years ago