[SOLUTION] The way to use Set Focus and affect it to Aim Offset for AI

When you setup a “SetFocus” task something like this:

Then you got Aim Offset of AI when you close to AI like this:

It’s seem like AI aiming to pivot point of player character.

I found a solution for myself, anyone have same problem can try this!
First, you need create a “Pawn”, a empty pawn, naming what you want, i called it “BP_FPS_FocusPawn”:
02
03
No need setup anything in that pawn.
Open your player character, in “Begin Play”, spawn the pawn you just created then attach it to what ever bone you want, or you can create a socket in your player character skeletal then attach to that socket, in my case, i attach the pawn to “spine_03”.


In your “SetFocus” task you setup like this:

Now, you have the result like this:

or when i’m attach the pawn to “head” bone

5 Likes

Hey there @MoonKnight998! Welcome to the community! Awesome work and great rundown. This ended up in the forum section so it may not get all the views it should! I’d recommend posting to the learning area as a tutorial as well if you’d like it to be more easily searched!

Thank you so much for your recommend! Hope anyone have same problem found my post. This is a short solution, i don’t think it’s a tutorial actually. So i’ll be keep it here, thank you!

1 Like

It pains me to realize just how simple the solution was to my problem. I have melee AI but when they attacked they bent their backs and attacked the sky and I was stuck here for like two weeks, but this fixed it.

Thank you sir, you’re a gentleman and a scholar. And I would be honored to name my firstborn ‘XCLICXC’ in honor of you.

1 Like