TheGameCreators / GameGuruRepo

The GameGuru Repository For Community Collaboration
http://www.game-guru.com
137 stars 56 forks source link

Improve NAVMESH Blockers (opening/closing doors) #4726

Open LeeBamberTGC opened 1 year ago

LeeBamberTGC commented 1 year ago

Currently, the NAVMESH blocker system switches off the polygons in the navmesh below doors to isolate paths through closed doors, but the polygons are not ideally placed, and can cause characters to freeze in unsuitable places: image

Instead, create an improved navmesh blocker system to identify all doors(blockers) and exclude them from the navmesh (make static for this purpose) so the nav mesh is generated around them. Once this step is done, manually add a polygon quad to fill the area created by the blocker, and mark those as toggle polygons for opening and closing the door. In this way, ONLY the area immediately under the door (blocker) is toggled in the nav mesh for a sharper system and better paths and character behaviors.

TenebreGaming commented 1 year ago

Lee, if you do this, can you include a way to disable it (per door)? There are currently several people including myself that have either reduced the size of the current navmash blocker in order to allow characters to "see" a path through closed doors, and those characters, realizing there is a door in the way will attack the door directly and eventually break it down. The current system, which I agree isn't optimal due to the radial nature allows some doors to be fully blocked (thus allowing "safe" zones") and others to be pathable and thus attackable.