AI moves in editor/viewport normally but changes it's behavior when switching to Standalone Game (ai starts to move in a straight line and do not go around obstacles like in editor mode)

I have my ai move to a specific location with an “AI Move To” node which works flawlessly in the viewport/editor when pressing play. They move around obstacles and objects and arrive at the destination. When switching to the “Standalone Game” mode the ai just start moving in a straight line to the destination point and stuck on any obstacle on the way which don’t happen in the viewport.

So my question would be what is causing this and how can i fix it ?

Viewport play mode

Standalone game mode

Edit:
Was reading that “Can Ever Affect Navigation” can cause some wierd movement behavior on standalone or packaged game. But thats not the case to me those are deactivated on my ai as well as on the surronding objects. Don’t know what else could the cause be to make the ai move in a straight line and start ignoring everything else around it. I rechecked the nav mesh but don’t see anything out of order. Don’t even know for what should i even look for in the details panel. On the editor after pressing play everything works…

Couldnt find anything else here on the forum only few more similar posts that never get an answer to it. And the one with the “Can Ever Affect Navigation” but this seems not the case for me.

1 Like

Hey guys is there anything i could try to fix this? Or any other idea for a solution to this would really appreciate it thx

Edit: Unfortunatly i still couldn’t find any solution to this so hopefully someone knows more and can share some knowledge on how to fix this or any more details on this topic…

A couple of things could be happening, it could be that the nav mesh isn’t building correctly in the standalone game, or building fast enough. Its hard to know exactly without seeing more than the video. Are you just using the blueprint Ai Move To or do you have more going on with their ai? If it keeps being an issue I know most tower defense path games setup splines for their ai to follow until something interrupts them or pulls their aggro so that is an option as well.

You can also just try moving around the spawn point and see how they react, it might give some clues to navemesh issues etc.

1 Like

Hi

Yeah the ai is really simple made. There is just an “AI MoveTo” node and that’s all really is…

Sounds pretty good i will dig deeper into this thx. I made the ai move to right at the very early stages of my game and didnt touch it scince then. It was more or less to have something that just works for testing purposes. Anyway it is time to polish the ai so i might try this with the splines you mentioned.

And yes the game is a tower defence here is how it looks like if you want to see more of it (at the end of the video is a gameplay befor that is a lot of skills showcase/skill tree and stuff)

1 Like