I have followed the implementation of MoveToActor but it's not working at all

I have followed the implementation exactly for MoveToActor, but when I try to build the code it throws this error:


I have no clue as to why my AI is not moving, it does the set focus but does not move at all. Even before putting MoveToActor in the Tick function, it never moved.

That error is basically saying you have declared AShooterCharacter::Tick but you haven’t defined it. You’re getting that error because you haven’t saved that file.

It got fixed by adding the AIModule to my build.cs and then rebuilding. It now works perfectly so I’m assuming all I had to do was add the AIModule in, which I’m assuming came in a later version of UE as this bit of the course is on a much older version.

You do not need to add that. Adding that wouldn’t fix something not working in game, it would only fix linker errors when building the project using something is defined within that module, which your tick function isn’t (it’s in your module). Sam’s project builds successfully as is with no AIModule in the Build.cs in UE 5.2


In the screenshot you have provided shows your file is not saved which is what the white dot means; that changes were made since the last save. So you were very likely trying to compile the file where lines 17-21 were not present.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms