Commit Graph

23 Commits (e1665f39450dd9b70fa67a47bd3b26f4d9bdb9e9)

Author SHA1 Message Date
elsid f9e9368fda
Add operator<< for DetourSettings 2 years ago
elsid dd08154b23
Add operator<< for DetourNavigator::AreaCosts 2 years ago
clang-format-bot ddb0522bbf
Apply clang-format to code base 2 years ago
elsid d15e1dca84
Use R-tree for objects to be used for navmesh generation
Instead of storing a set of objects per tile.
2 years ago
elsid e1bed86d7e
Do single navigator update per frame
Primarily for crossing cell border case. Each Navigator::update call has a cost.
Doing it multiple times per frame increased frame duration on cell loading.

Call Navigator::wait only when cell has changed but do not use
Scene::hasCellChanged because it doesn't always indicates it.
2 years ago
elsid 1a5932a669
Move std::ostream& operator<< to .cpp 3 years ago
elsid 1a12c453d6
Support different agent collision shape type for pathfinding
Actors may have different collision shapes. Currently there are axis-aligned
bounding boxes and rotating bounding boxes. With AABB it's required to use
bounding cylinder for navmesh agent to avoid providing paths where actor can't
pass. But for rotating bounding boxes cylinder with diameter equal to the front
face width should be used to not reduce of available paths. For example rats
have rotating bounding box as collision shape because of the difference between
front and side faces width.

* Add agent bounds to navmesh tile db cache key. This is required to distinguish
  tiles for agents with different bounds.
* Increase navmesh version because navmesh tile db cache key and data has changed.
* Move navmesh version to the code to avoid misconfiguration by users.
* Fix all places where wrong half extents were used for pathfinding.
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 33bb18850d
Move operator<< to debug.hpp 3 years ago
elsid e0c4f08aa5
Remove redundant includes 3 years ago
elsid 88ac77df1f
Fix writing to file for RecastMesh
Add missing scaling and y, z coordinates swap.
3 years ago
elsid fea4fb6e69
Make AiPursue path destination to be as close as possible to target
Even when target is not reachable actor will try to run there either because
target navmesh polygon is selected within extended area or because partial path
is built to the closest possible polygon.
3 years ago
elsid 349040ffb2
Use status codes to handle navigator errors instead of exceptions
For find path use case.
5 years ago
Andrei Kortunov 14b756a692 Use a generic logging system for RecastNavigation 6 years ago
AnyOldName3 4489f23005 Remove recastnavigation conflicts 6 years ago
elsid ae7285e960
Use ScopeGuarded instead of raw mutex 6 years ago
elsid b33a291a67
Log thread id 6 years ago
elsid c3298d13a6
Add log sinks (stdout and file) 6 years ago
elsid 144e1a063b
Support animated objects 6 years ago
elsid 794cfc4aa3
Write detournavigator log to file 6 years ago
elsid 41caca24ee
Options to enable/disable write recast mesh and nav mesh into file 6 years ago
elsid 6d233ae868
Option in settings to enable/disable detour navigator debug log 6 years ago
elsid fafba8ea0c
Use recastnavigation to find path 6 years ago