AimOffset Not Aiming at Crosshair Properly

Hey all, I have been trying to fix this issue for days, and I have the feeling I am just stupid and not seeing the obvious solution. So I figured instead of smashing my face against the brick wall I would ask for help here.

We have used a method of blending between an upper body and lower body animations so we can use a locomotion AnimBP and they blend in the state of the upper body based on equipment or activities the player is doing. Here is an example.

I also went about creating an AimOffset to make sure the upper body would be able to aim weapons and the like toward the camera even though the lower body/hips is facing another direction. Here is an example of my AO.

The problem is, when all is said and done, and I play the game. The AimOffset’s Pitch follows the crosshair up and down, but I get zero yaw working. This means that since the hips of the character are pointed to the right, the player is always pointed off to the right instead of aiming forward. Here is an image of the issue.

The code is plugging in the player’s input pitch and yaw as defined by Unreal Engine’s defaults to the AimOffset so I have no idea where to even start with a solution.

Thanks in advance for any advice.

The looks like a bug in the layering between your bones. Go to the node and click its details in the AnimGraph and verify the setting “Mesh Space Rotation Blend” is checked. Here’s an what your graph should look like.

otherwise, like for everthing else, it’s an issue with the order of operations.
Your AO should come in as the first thing after the base animation - then whatever else you need gets put on top of it.

Could you explain more about the order of operations(reasoning/logic)?

I watched the “Bringing a Hero from Paragon to Life with UE4” and the order was different, they use;

1: Locomotion
2: Upper body layers (shooting, melee, abilities)
3: AO
4: Overrides for “full body” animations
5: Post process (IK and other stuff to clean up animation)

AO affects the animations based on what poses you use within it.
as such, applying a standing AO to a crouch pose results in animation issues (exorcist spinning head, wrong rotations etc).
These errors can also occur when you layer a shooting pose before the AO took place. (Aside form the fact you should have an AO for shooting specifically anyway).

If you layer the AO on top of animations, like recoil, the recoil will likely cause errors since the AO aims to correct it.

Thats why OOP matters. Depending on what the animation is and how its used.

In the Paragon case, it works for their animations, this doesn’t mean it works on everything. Nor does it mean they got it wrong. The samples we have don’t really include much of anything aside from locomotion and AO.
in fact, you need to hook up the turn in place yourself. As well as any start/stop and all the other nice animations they provide.

Again, in regards to the AO.
Placing it after shooting/meelee/abilities is more likely incorrect with generalized animations. Each of those “states” would likely need its specific AO applied.

Makes sense, Thanks for explaining that.