swordlegend / recastnavigation

Automatically exported from code.google.com/p/recastnavigation
zlib License
0 stars 0 forks source link

Region cost per bot instead of stored with dtNavMesh #103

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

Just a quick comment about:

dtNavMesh:
float m_areaCost[DT_MAX_AREAS];

I think it would be better if this were passed in - rather than
stored. Its current setup implies that all bots using a navmesh have
the same cost per region type....but let's say that one bot is very
good at swimming, but moves slowly through sand...and another is good
on ground but wants to avoid water if possible. I think you could do
away with the region filtering by having bots provide an array of
region costs...and a special value (let's say -1.0f) means that the
region can not be navigated.

Just an idea - it's how I'd implement it...as it's more flexible :)
(maybe I've missed something?)

- Neil

Original issue reported on code.google.com by armstron...@gmail.com on 17 Aug 2010 at 11:06

GoogleCodeExporter commented 9 years ago
Fixed in R200. You can create custom version of dtQueryFilter, which allows to 
modify the polygon visiting checks and cost calculations.

Original comment by memono...@gmail.com on 20 Aug 2010 at 10:10

GoogleCodeExporter commented 9 years ago

Original comment by memono...@gmail.com on 24 Aug 2010 at 6:22