Download

Red floor when AI walks on it

Now that I have my AI randomly walking around the NavigationMesh, another problem appeared. Wherever the AI is heading towards to, it shakes a little bit, and it turns out that wherever he stays, the spot he stands on or walking on turns red instead of staying green.

Screenshot_1.jpg

What am I missing? Also the AI snaps when he turns around, and I want it to rotate smoothly.

What blueprint node or setting needs to be added/done?

Sounds like you enabled “Can Affect Navigation” for a component on the character and that you changed the nav mesh generation from “Static” to “Dynamic” (from Project Settings - Engine - Navigation Mesh - Runtime - Runtime Generation - Static). Now when your character moves, it influences that portion of the nav mesh.

If you want your AI character to not snap when he turns around, uncheck “Use Controller Rotation Yaw” from the Class Settings of the AI character blueprint, and check “Orient Rotation to Movement” from its MovementComponent. Note: you want this only when it’s NOT chasing a target (otherwise, it will keep facing you if it chases you up some stairs, for example, which will make it seem like the character is running backwards).

Yes, that was the problem, that it’s now fixed. Thank you.
Sorry for late response though.
One more thing before I close topic, why is my game working almost perfect when packaged but not so perfect when in editor? For example, I made a simple blueprint about cameras switching to the DeathView camera when the player dies. But only the Thirdperson camera switches to DeathView camera, the first person camera doesn’t seem to switch at all.