Cannot get Velocity of AI

Ah first of all, my bad. I didn’t check thoroughly and I missed that you are working on 2D. So all that blendspace/anim BP stuff you can check off the list! I think that best way to start off the AI on a 2D project is just copying your player character blueprint and editing out the stuff.

As to my understanding, there is no velocity getting returned because there is no movement input getting fed to the character. So to my understanding, AI Move To should not be used. Instead, you must use a logic similar to your player character. Thus, why I said it would be easier to copy off the player character.
Maybe read this post in the community, seems like what you would like to do:

For this, you can use the AI Debugger:

To enable it, go to edit–>project settings and search for debugger →

’ to enable it in game. Then you can click numpad 4 to check AI Perception. If you go ahead and go to spectator mode with TAB, you can see just that.

Don’t forget! You can utilize the AIController you created for the movement logic. Just do this stuff inside it instead of the AI Move To:

Now the velocity should be captured and the flipbooks should work as intended. I’m really not the best with 2D so I might not have the perfect solution. Let me know if this works or helped you!

1 Like