I’ve been developing a Paper2D platformer and recently have found a very interesting behavior that I wasn’t able to change. I wonder if any of you would have an idea of why this is happening, so I could continue my troubleshooting on this?
I use an AI Character with simple function to Patrol the level, with the use of AI MoveTo with Target Points as destinations. Periodically, the Character decides to turn in Y axis, which is being restricted for the Character Movement component.
I wonder if this has something to do with AI Move To function I use to move the character, because it has “Acceptable Radius”. Changing the value of radius to values close to 0 also did not help.
Unfortunately, nothing has changed after the orient movement to rotation set to True.
I wonder if it’s not the constraints, but the way the AI is told to move to a location?
I’ve found out few interesting points:
When the constraints are disabled, the AI is able to successfully traverse through the environment.
I see that the AI is moving through Y axis when nearby the Target Point.
I also found that the character makes a slight turn on the way to the Target Point.
I’ve attempted to change the object, used as a floor, however, AI is still making that turn.
I also found that the character is on a different X coordinate then the floor. When placed on the same coordinate/plane, AI just stands at the same spot, turning around. It looks like the pathfinding makes the character to move to a different location.
I found what was the problem:
The AI character had an additional collision box, set to block World static, instead of ignoring it.
Nobody would be able to find it, without the access to the actual AI BP.
Hey I found my own solution to this issue. I’m making a 2.5 D platforming game with paper 2D characters and I just wanted the ai character to follow me on the same plane without rotating. to stop it from rotating I went to the 2D character blueprint viewport clicked on the (self) tab at the top left and searched for “rotat” on the top right. Under pawn “Use controller rotation yaw” was true so I unticked it to false and sure enough it worked.