amaccann / phaser-navmesh-generation

12 stars 1 forks source link

Fine-tune the corner offsetting #3

Open amaccann opened 7 years ago

amaccann commented 7 years ago
  1. There are some bugs in the offset code; this needs fine tuning a little as there are edge cases where the offset path is way off from what it should be
  2. Also, there are cases where the offset path may thread the Actor through a collision tile - there are no checks that said offset path doesn't. (see narrow 1 tile gaps that turn turn corners)
amaccann commented 7 years ago

Narrow funnels also cause issues too (particularly when also combined with s-shaped corridors and the like). Not sure what the best course of action here; perhaps reverting to mid-point calculations when the current triangle is of a certain size?