Download

Why Do my Aimoffsets have my characters hand go through the weapons?

I have my character with an aim offset, They are all using mesh space, additive with a base pose of my idle animation…( MY idle animation is a character in idle with rigid arms, in a t pose. The arms do not move at all but the whole players bobs up and down… I find that my character can go to the animations just fine, but when interpolating between 2 or more aim offsets, suddenly the left hand, goes out of holding the weapon. Any help or tips on aim offsets to make them as best a possibly can be?

How have you attached the weapon to the character?

Yeah, if the weapon has its own bone which is attached via a constraint inside your anim software, rather than a direct 1:1 socket attachment, you’ll find this sort of disconnect appears between aim poses because the engine is trying to interpolate the position of the weapon control bone independently of the hand bone.

I ran into this issue, and my solution was to use IK solvers to keep the hand clamped to the gun while aiming. This way, no matter where the gun moves, the hands will always track it exactly, without needing to use 1:1 socket attachment (which can cause problems with things like reload animations or holster/unholster animations).

My game is a supposed to work with mp btw) I have a weapon attached to the hand, With snap to settings. And wouldn’t using a ik solvers run into issues when you want the hand to say reload?, or just disable it when you want to reload?

Well for me reloading is a different State in my State Machine from aiming so I just don’t put the IK nodes in it and all’s good. Since reloading doesn’t use an aim offset (my player reloads facing actor forward, not control forward) it lines up fine.

Hi,

This requires an AnimNotifyState, plus some extra logic (transition from IK and animation).
Create a custom AnimNotifyState which can be set per animation, so a reload animation, will define when the IK should be disabled.

Not necessary. If you place the IK calculation inside the State’s anim graph, then it won’t have any effect outside of that State.

I use nodes outside my State Machine to control foot IK, but I use in-State-specific setups for hand-to-weapon IK, procedural torso rotation, etc.

If you only need the hands clamped to the gun while aiming, you don’t even need to use the Event Graph. It can all be done with IK nodes which take their transform from the root bone of the gun (though you’ll need to manually offset the locations/rotations to make sure the hands are where you want them, pose-wise).