Can't understand why Aim Offset isn't working - please help!

Hi guys,
I’ve been at this for days without resolving - I retargetted old UE4 Mannequin to a new one (as I was already using specific mannequin in my project) for AIM offset .

The Aim Offset seems fine when you test it as a standalone, as you will see in the recordings below as does the Anim Event Graph and Retargeter

For the Ref Pose I used “Idle_Rifle_Hip” and had no additive for that one as its the Ref Pose.

In the Anim Graph screen recording you will see that it is set to blend with a locomotion state machine and blended per bone by “spine_01” bone but animation is not reacting to the aim movements at all.

I can see that if i remove one or two animations from the aim offset that it “leans” in a direction of remaining animations so it definitely seems to be picking up “partially” the offset but not aiming exactly as I want.
Can Anyone Help???

I’m not entirely clear on the issue, but I would start by noting that Aim Offsets are additive, and you’re using them with a “layered blend per bone” on top of your base locomotion pose and that doesn’t seem correct. Additive animations are bone deltas from a ref pose; they won’t track correctly if the underlying animation is not a ref pose.

You seem to be employing two different logics here; you’re using the layered blend per bone to bring in the “aim offset above the spine”, but it’s got the cached locomotion pose as its base pose, which isn’t the “Idle_Rifle_Hip” animation your AimOffset is designed to work with?

I think, looking at your clips, you need to either
a) replace the Locomotion Cached Pose input to your AimOffset (not your layered blend base pose) with Idle_Rifle_Hip or whatever additive base you use, OR

b) swap your aim offset for a blendspace, which is like the non-additive equivalent of an AimOffset, and use the Layered Blend Per Bone to handle the blending across the spine entirely without worrying about the additive.

AimOffsets are designed to provide an offset from some baseline modified animation set (e.g. if your character has a run_with_rifle animation set that makes his torso sway slightly while keeping the gun constant, the aim offset will allow you to retain all the nuances of that animation with the adjusted aim position, rather than blending to a static upper torso which a blendspace creates) but your base locomotion I assume does not have a suitable upper body pose for rifle aiming by default.

1 Like

Thanks for replying @RhythmScript

I was mainly following the exact steps in Creating an Aim Offset in Unreal Engine | Unreal Engine 5.1 Documentation
I’ve also seen others add base pose as a locomation state machine and add in the offset as above.

Even if i leave out “layered blend per bone” in Anim, it doesn’t apply the aiming offset.
As I move about in in the level as per 2nd recording above, it just shows Idle in movements rather than aim movements.

I felt that Aim Offset was a “requirement” for using aiming of weapons but if blendspace is an alternative I could use.

But your second recording doesn’t show “the idle animation”, unless you have a very weird idle animation. Look at how the arms and head are twisted. It isn’t a correct aim pose, but it’s also not an unaltered idle pose.

What you’re seeing is classic mis-applied additives. Your additive is assuming a base pose of “arms forward, back bent, holding a rifle” as in Idle_Rifle_Hip. The aim offsets from that are manipulations of the bones relative to that base pose; the arm and head bend up by x degrees, say. So when you feed your idle animation into that, that’s what it does. Takes the idle animation (straight backed, arms at sides, NOT a rifle holding animation) and offsets them by x degrees. It’s adjusting them by the amount that would look right if you were starting with a static aim pose (“Idle_Rifle_Hip”). It doesn’t replace them with the final aim poses, it adjusts them by the difference between those final aim poses and the base pose.

Taking out the layered blend per bone won’t solve the issue in this case, at least not entirely. You need to either replace the AimOffset with a Blendspace (which is non-additive) and use Layered Blend Per Bone to drive that alone, OR be feeding the aim offset with the aim base pose (“Idle_Rifle_Hip”)

1 Like

ok thanks @RhythmScript i really appreciate the input!
I’ll try that in a few hours when I get home.
Thanks again.

I have Idle Rifle Hip selected/referenced in the AimOffset → “Additive Settings” area and i thought that was enough as per the unreal documentation but perhaps not.

Thanks - feeding the “Idle Rifle Aim” pose into the AimOffset space definitely helped - The only thing is if i use layered blend per bone, the top half doesn’t move/sway with the rest of the body while moving. its kind of static even though now I can move around and aim.

I will try a blendspace instead of AimOffset and see how that goes.

That’s part of it; that tells the aim offset “this is the base pose. The aim poses are relative to THIS pose”. So if you feed that pose in, you get the correct relative offsets

The only thing is if i use layered blend per bone, the top half doesn’t move/sway with the rest of the body while moving. its kind of static even though now I can move around and aim.

Right, so that’s what an aim offset is actually for.

What you’ve done is basically turned your Aim Offset INTO a blendspace; you’ve got the aim offset, and you’re feeding it the base pose, so the result works like it’s not additive at all.

Where Aim Offsets are useful is when you have a modified version of the base pose. So let’s say, in your locomotion space, you use a layered blend per bone to interpolate into the Idle_Rifle_Hip pose. You can tune the blend on that, maybe use some IK to keep the hands married to the gun, and what you’ll get is a believable run animation with some nice variety in the torso, sway and shoulder bend and all that, while aiming a rifle… but it will only aim forward.

From there, you apply the Aim Offset, which is an additive. So now you have this “sorta-kinda rifle forward animation” and you transform the relevant bones on the arm relative to this base pose, and that gives you the sway and bob and lean, but rotates the bones to the correct aim angle. Doing it this way is often easier than directly using Layered Blend Per Bone because you can be more relaxed in your blend to the “rifle holding during movement” pose while still being very strict in the “which direction the rifle is pointed” offsets. If you try to use eased blending without the additive you might end up with poses that don’t correctly align with the aim direction.

1 Like