I’m working on a tile-based game and use the AI Controller’s Move to Location function to do the movement. My tiles are 100x100 in size and I configured the NavMesh so it works on that scale:
As can be seen, the NavMesh visualization shows green. But for some reason, the Move to Location function always returns “Failed” and the character does not move at all. See this video: NavMesh not working with small tiles - YouTube
The red point indicates the destination I hand over to Move to Location. My Blueprint logic looks as follows:
Determine location on grid simply snaps the inputted location to the 100x100 grid, which is the center of every tile. My tiles have a 100x100 collision that is set to “NavArea_Default” as to be navigatable. I’m doing my tiles as separate static meshes because this is puzzle game where (most) of the tiles vanish after the player walked over them, so I need to be able to remove them one by one.
I tried my BP logic on a 2000x2000 default cube and there some really strange behaviour starts to occur: Strange NavMesh behaviour - YouTube
For some reason, I can move to most of the cube on the left half. But all of the right half is not navigatable. Even though everything is green on the navmesh visualization.
Am I doing something wrong here? Or is this generally a bad approach to tile-based movement?
I tried using Set Actor Location before but then I would have to do everything manually (animation playing/blending, checking for obstacles/walkable tiles, etc.).
Any help would be very much appreciated!