Add movement input in direction of other actor

Hey everyone, I’m wondering if anyone knows how I can find a direction I can use in AddMovementInput that would move that character in the direction of another actor/character? The reason why I need this is because I’m working on my AI, and I am setting it up so that the AI character strafes either left or right and I want to slightly interpolate the right vector with the direction of the player so that when he strafes, he slowly moves in the direction of the player. Any ideas how I can get around this?

Thanks!

@paragonx9

this might help:
FindLookAtRotation [node]

Tesla Dave’s Video: https://www.youtube.com/watch?v=JQWIckh4XT0

Thanks for the reply! The first thing to come to mind was actually FindLookAtRotation(), but I’m not really sure how I can convert that into a vector that I can pass to AddMovementInput().

well there is these:

make vector
get right vector

you can right click on the rotator that is the output of Find Look At Rotation & break the rotator then use the make vector but not sure if it’s the result you need or not

but it’s late here & i’d be afraid to test my memory so you could test them yourself & see the results
(there’s also get up vector too I think but that’s probably not what you need, lol)

I think you got it now. gl :wink:

Alright, I figured it out. I just ended up using GetRotationXVector from the GetLookAtRotation and it worked just fine. Thanks!