Hello Guest

Author Topic: TK2D TileMap - A* Project Problem (Collision)  (Read 3459 times)

Roamer

  • Newbie
  • *
  • Posts: 10
    • View Profile
TK2D TileMap - A* Project Problem (Collision)
« on: April 23, 2015, 01:58:25 pm »
Just a quick question as I've run into a small problem.

I'm making a top down dungeon crawler-y type of game, using TK2Ds tilemap system and aaron's A* Pathfinding Project for enemy logic.

I've run into a problem though, large parts of my map (where no dungeons rooms are) are empty, but the A* asset still recognizes it as passable terrain, even when that space is filled with tiles it will not be recognized as un-pathable, because TK2D Tilemap uses edge colliders, so it will only detect it at chunk edges, which is somewhat pointless and doesn't really help my problem.

Here are a few pictures to help illustrate my problem:
Map with colliders: http://puu.sh/hnYUb/f047537131.png
Map with navmesh, as you can see outside parts are still traversible, as seen with the path returned for the small sprite (green line is path): http://puu.sh/hnYWO/5124d846ef.png
Same problem still occurs if empty parts are filled with tiles with box trimmed set as collider, Map with colliders: http://puu.sh/hnYZT/817cdf6f9f.png
Navmesh: http://puu.sh/hnZ1E/6e2029b254.png

I'm not sure if there is a way to fix this, but any and all help is appreciated! Thanks in advance :)

Edit: Forgot to add that the problem isn't that it is pathable (seeing as reaching the outside from within is impossible anyway), it just uses up a lot of performance when requesting paths seeing as there are a lot more nodes.

Edit2: I seem to have solved it for now, if you alternate sprites it will not create a mesh because the space is too small, maybe there is a smarter way to do it though. Pic: http://puu.sh/ho9Wx/c96e43876c.png
« Last Edit: April 23, 2015, 05:40:51 pm by Roamer »