1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2024-12-28 18:18:52 +00:00
Commit Graph

8 Commits

Author SHA1 Message Date
elsid
94b085af9e
Add Navigator and Lua API function to find nearest position on navmesh 2023-11-18 23:54:37 +01:00
elsid
28f7a89530
Reuse dtNavMeshQuery
To avoid redundant allocations.
2023-02-17 15:05:25 +01:00
clang-format-bot
ddb0522bbf
Apply clang-format to code base 2022-09-22 21:35:26 +03:00
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.
2022-06-21 12:57:32 +02:00
ζeh Matt
18f16eac4c
Refactor DetourNavigator to pass prng along, use world prng for AiWander 2022-05-17 20:37:15 +03:00
jvoisin
421e6629ad Fix unnecessary-copy-initialization
> warning: the variable 'key' is copy-constructed from a const reference but is
only used as const reference; consider making it a const reference
[performance-unnecessary-copy-initialization]

Found by clang-tidy.
2022-01-04 20:42:09 +01:00
elsid
01c712d5f1
Split navigator settings into subtypes
Mostly to distinguish settings that affect properties of the generated navmesh.
2021-12-10 23:55:03 +01:00
elsid
9f808fbe3a
Move findPath-like navigator functions into a separate header 2021-11-06 00:34:06 +01:00