Hi everyone, I’m developing a little tank minigame and I want to add artificial intelligence to enemy tanks. I have run into a little problem with the tank finding its way through Unreal’s pathfinding efficiently. And Google has not taken me anywhere that really helps me with the problem.
The tanks that I use vary a little in size each one, but all are characterized by being wide on the Y axis. To find my way around obstacles on the ground I call the “Find Path to Location Synchronously” function. This function gives me a path, but all the generated points are very close to the test walls that I have given as an example.
As you can see in the following image, in “pathfinding context” I have added the tank’s Pawn in case in this way the function calculated the points according to the tank’s dimensions, but the result was the same.
Currently my tank moves according to physics, that is, I move it as if it were the Unreal Engine vehicles but with my own functions in my own blueprints, so I do not use any type of component of movement as characters and vehicles do. In addition, so that it moves properly and does not cause problems, the root of the blueprint is an empty “scene component” and the movement of the tank is carried out by the “skeletal mesh” through the colliders of the same. I don’t know if this will influence the size calculation with the navigation path.
It is the first time that I make such a specific artificial intelligence and with these conditions. Is there a simple trick with which I can make the route points further away from the walls / obstacles and calculate wide routes where the tank can pass without problems? For example, avoid passing between two buildings very close together and do not give him space to pass.
I apologize for the poor English. If you have any questions about it or you want me to clarify any questions about my problem, ask me.