Commit Graph

47 Commits (0603aa131d31e06cfa2ac8e34612404b02de13d9)

Author SHA1 Message Date
elsid 7dcb219ecf
Add raw heightfield data to navigator 3 years ago
elsid 8571c317d8
Add raw water data to navigator 3 years ago
elsid 9f808fbe3a
Move findPath-like navigator functions into a separate header 3 years ago
elsid 5e99454cc4
Add factory functions to create navigator implementations 3 years ago
elsid 0c8a811ad5
Render only cached recast mesh
To avoid waiting while recast mesh is generating.

Remove redundant continue.
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 c8987bda2f
Store reference to BulletShapeInstance for btCollisionShape
To keep btCollisionShape lifetime.
3 years ago
elsid 4574e5f565
Remove redundant Navigator API functions 3 years ago
elsid 9a5ec5fd03
Store heightfields as array of heights instead of triangles
To reduce size of RecastMesh and therefore cache size.
3 years ago
elsid 753767d6d9
Store only water shift
Rotation is not used.
3 years ago
elsid 4a6961b365
Trigger navmesh update on moved player only when player tile has been changed 4 years ago
elsid 59f89d22f8
Apply min distance only for not present tiles
To avoid waiting when navmesh update is triggered by transformed object for
already present tiles.
4 years ago
elsid f169f8e6f0
Wait until navmesh is generated for interior cells
Add special loading progress bar.

It should be fast enough to not keep loading screen for noticably long but
will provide better pathfinding for actors inside interior cells.
4 years ago
elsid 865ef56a09
Replace include by RecastMesh forward declaration
To reduce dependency between navigator interface and implementation.
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 8dba61f7ae
Use navmesh raycast to find reachable position around target 4 years ago
Bret Curtis 62b0781f7d use std::optional instead of boost::optional 4 years ago
psi29a 0dc7715c35 Merge branch 'object_paging_retry' into 'master'
Object Paging

See merge request OpenMW/openmw!209
5 years ago
elsid b095ca6c86
Use actor speed to define area cost for pathfinding 5 years ago
bzzt lost a hitlab login c1ebd9474b stop navmesh updates when ai off
Signed-off-by: Bret Curtis <psi29a@gmail.com>
5 years ago
elsid c4cd3b2c4f
Add pathgrid to navmesh as off mesh connection 5 years ago
elsid 7ae7cb181d
Support recast mesh rendering 5 years ago
elsid 349040ffb2
Use status codes to handle navigator errors instead of exceptions
For find path use case.
5 years ago
elsid f7caeefddb
Fallback to straight path when navmesh and pathgrind are not available 5 years ago
elsid 1e106013a0
Use navmesh to find wander destination outside pathgrid for ground based actors
Use dtNavMeshQuery::findRandomPointAroundCircle from recastnavigation
5 years ago
elsid 4624f31788
Report navigator stats 6 years ago
Bret Curtis cb1a5f3679
Merge pull request #2245 from elsid/navigator_refactor
Refactor navigator related code
6 years ago
elsid 8d2af94b75
Use default objects for NavigatorStub methods result 6 years ago
elsid 614d5243c3
Make NavMeshCacheItem consistent
Move all logic related to this type into its methods.
6 years ago
elsid ccc709a316
Store guarded navmesh cache item in shared_ptr
Remove useless SharedGuarded type.
6 years ago
elsid b9f21ec81a
Use custom steps size to make smooth path depending on half extents 6 years ago
elsid 16675fd254
Return empty path when navmesh is not found for agent 6 years ago
elsid 1d3668cd22
Add Navigator interface 6 years ago
elsid d63881e054
Make Navigator::findPath independent from class fields 6 years ago
elsid ed73d130f9
Cache navmesh tiles
Use LRU modification to hold currently used items. Use RecastMesh binary
data for item key.

Store original pointer of btCollisionShape in user pointer to make available
it as an identifier within all duplicates. Use pointer to heights data array
for btHeightfieldTerrainShape.
6 years ago
elsid 69b5834c64
Add doc for Navigator 6 years ago
elsid 1a27489904
Add special type for object id 6 years ago
elsid 346e9e3141
Add off mesh connections for doors without teleport 6 years ago
elsid d02beae5a8
Find path for actors according to their abilities to swim and walk 6 years ago
elsid c95cea414c
Support water for NavMesh 6 years ago
elsid 72f211ef28
Add enums for area type and flags 6 years ago
elsid fa23b590a4
Add unwalkable areas to NavMesh 6 years ago
elsid 144e1a063b
Support animated objects 6 years ago
elsid 70a369f70e
Add command to enable NavMesh render
togglenavmesh or tnm
6 years ago
elsid dd5e6a61a3
Support btCompoundShape for RecastMesh 6 years ago
elsid d1d034a1ec
Update NavMesh one by one tile in order from nearest to player 6 years ago
elsid fafba8ea0c
Use recastnavigation to find path 6 years ago