Possible bug in "Move To" behavior tree task in 4.9

I just tried that (in the same project) and it didn’t work, unfortunately. I cant change to a new project because its got loads of work in it… Thanks for the info!

Hello ,

I was able to reproduce the issue that you are seeing on your end. However, this only occurs with your assets. I created new assets in a clean project (to make sure everything was working before the test) and then migrated them over. The Ai that I created worked find in your project. Could you try making your AI in a clean 4.9 project, check to see if it is working and then migrate it to the project that is showing the issue?

When you say make my ai, what part of it do you mean? The blackboard/behavior tree? Or are you migrating code to the new project?

Ok, I made a mistake in my code. The MyAIController class should have the line;

PlayerCharacterID = BlackboardComp->GetKeyID("PlayerCharacterID");

In Possess. As it is it says “PlayerCharacter”. With that adjusted, its now got exactly the same problem the original project does, which is MoveStraightTowards works, but MoveTo doesnt.

Hello ,

After further testing I found that your target destination is the character itself. This means that the character does not move because it has already reached its target location. To test this I changed the Ai Controller of “MyBot” to one that I had made. From here I set the black board key “PlayerCharacterID” to the type actor and assigned an empty actor in the level to the black board’ss object key (PlayerCharacterID). With a new destination “MyBot” worked as expected (using “Move to”). I hope that this information helps.

Make it a great day

hi Rudy. I appreciate the feedback but don’t see how the conclusion you’ve come to could be right. The only thing I’ve changed between MoveDirectlyTowards and MoveTo is the task itself. Everything else is the same. If that was true then MoveDirectlyTowards would be affected in the same way?

Btw, probably worth mentioning, in the original project, this is what MoveTo does;

Hello ,

After running a few more tests I found out why we are getting different results. It appears that if you do a rebuild in visual studio while the project is open “Move To” will function as expected until the project is closed again. This gave me an idea. After opening a fresh version of the project provided, I preformed the following steps.

Steps:

  1. Unzip project
  2. Open project
  3. Opened MyAIController in VS
  4. Changed PlayerCharacter to PlayerCharacterID (as you stated above)
  5. Rebuild project
  6. Opened BotBehaviorTree
  7. Changed Move Directly Towards to Move to
  8. Open Persistent level
  9. Play In Editor
  10. Should work fine
  11. Close Editor and VS
  12. Delete Saved, Intermediate, Derived Data Cache, Binaries
  13. Open project
  14. Open Persistent level
  15. Click Play In Editor
  16. Notice it’s still working and should be fixed now

Please try these steps on the project that was sent to me and then apply them as needed to the project that you are having issues with. I hope this information helps.

Make it a great day