xaguzman / pathfinding

Java pathfinding framework.
Apache License 2.0
97 stars 27 forks source link

TiledMapTileLayer cannot be cast to NavigationTiledMapLayer #24

Open DarthYuber opened 2 years ago

DarthYuber commented 2 years ago

I did exactly what the guide said:

map = new NavTmxMapLoader().load("res/battlefield001.tmx",params);
navLayer = (NavigationTiledMapLayer) map.getLayers().get("navigation");

But then I get Exception in thread "LWJGL Application" java.lang.ClassCastException: com.badlogic.gdx.maps.tiled.TiledMapTileLayer cannot be cast to org.xguzm.pathfinding.gdxbridge.NavigationTiledMapLayer

I have used a navigation layer in Tiled etc. What can I do? Newest libgdx and tiled version.