I have a tank AI that i want to move with MoveToLocation. At first i used a pawn for this but because a pawn’s movement capabilities are less optimized i switched to a character so i could benefit the character movement component. Now the tank does not move anymore. I don’t really know why, but the MoveToLocation just returns ‘Failed’.
I used a visual logger to collect some data:
As you can see, it should move to the red line but it doesn’t. (red line is actually location of the visual logger but since i set the target location to (0,0) it matches the visual logger location)
I can’t really find a solution for this.
I also don’t know a lot about the included capsuleComponent in a character class. I have a different mesh set as root of my tank, and i kind of ignore the capsule component. I don’t know if that has to do with the character movement.
I know also what a navmeshbounds volume is but not what the recast navmesh is for.
My project is actually c++ but this is not a c++ problem. (I added the moveToLocation in blueprint for testing purposes. I print the response each which is “Failed”).
The AI does do other tasks, like aiming, but not the moving part.
Here is my tank layout.
Here are the settings of the navigation mesh and system.
Here is the begin play code of the controller
I can also show all the data of the character movement component, but then i’ll have to remove some other pictures because i can only add 5.
EDIT: When i change, in the charactermovementcomponent settings,“planar movement: constrain to Plane” to true, and set "Plane Constraint Axis Setting to Z, it prints out request successfull, and still does not move. just something i noticed. When i was using a pawn (and when the movement still worked) i did not enable constrain to plane.