Ai Check which direction bot is moving
I have a Ai bot that's based on a playable character in my 1vs1 fighting game. My characters directional animations are based on the input axis it receives from the players controls. How can i calculate which direction the bot is moving relative to the enemyplayer, is there a way to receive input axis from the aicontroller? The bot and player are constantly looking at eachother.
Any Advice would be greatly appreciated!
asked Dec 20 '17 at 01:50 PM in Blueprint Scripting
There are no input axes from the controller AFAIK (and I looked in the code). I had to take GetCurrentAcceleration() and GetMaxAcceleration() and work backwards to generate input axes.
Here's the function I call to get the input axes. If it's not enough for you to run with, let me know.
With blueprint you can use FindLookAtLocation, where location is your second player (or other Actor) location. If you want to use opposite direction, you can add InvertRotator (negate like) to this direction. This all is easy to do with blueprints and here ready functions.
answered Dec 21 '17 at 11:54 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here