As the title suggests, I'm stuck. I've tried to figure this out for the past 3 (frustrating)days and I just can't get a target location in the opposite direction of the player from the AI's perspective without strange issues like the AI always running away to the left, or right (not caring where the player is) or it getting to a spot where it's just happy to sit despite the target location being updated or updated to the same location over and over again.
My AI is very simple and in 2D, I just need the AI to move away from the player when it has focus on the player(My behavior tree is working in that sense, I'm struggling with my behavior tree task that sets the "hiding position" vector that my "MoveDirectlyToward" task uses as a target location. Specifically I need the task to get the direction between the 2 actors, player and AI and set the blackboard value "hiding position" (Used by the movedirectlyto) to some distance away in that direction.
I know this should be simple and I don't feel particularly proud that after days of googling it I request someone's assistance to basically spell out the process for me
but I'm stuck and need help. (I have seen these https://answers.unrealengine.com/que...ayer-when.html https://answers.unrealengine.com/que...ning-away.html https://forums.unrealengine.com/show...ay-from-Player but I haven't been able to solve this)
My AI is very simple and in 2D, I just need the AI to move away from the player when it has focus on the player(My behavior tree is working in that sense, I'm struggling with my behavior tree task that sets the "hiding position" vector that my "MoveDirectlyToward" task uses as a target location. Specifically I need the task to get the direction between the 2 actors, player and AI and set the blackboard value "hiding position" (Used by the movedirectlyto) to some distance away in that direction.
I know this should be simple and I don't feel particularly proud that after days of googling it I request someone's assistance to basically spell out the process for me

Comment