Stumped, Left hand IK not updating when I move the socket

Hello,

I’ve already watched 4 different tutorials on YT to see if I can spot an obvious problem. My left hand has successfully snapped, but it is too my right hand. I can not move it with the socket I’m pulling location data from in my weapon skel mesh. I literally have no clue why it does this. I followed all 4 of those tutorials and made sure that the nodes were identical. But mine hand does not move when i move the LeftHandSocket inside the weapon while simulating.

Here is how I have it set up

  1. Each weapon is not rigged, I’ve added sockets to the root for my attachments and Left Hand, (all attachments sockets work fine)
  2. I’ve created a soldier component that holds all weapons equipped to player/enemy. This is where I have my equipped weapon stored.
  3. I’ve created an interface with an output of Transform
  4. in my player character, on event tick I’m running my BPI to update the Transform
  5. in my Anim Event Graph, I’m setting my Left Hand Transform from my BPI
  6. in my Anim Graph, I’m using the 2 bone IK node and FABIK node.
  7. When I move my socket on my gun’s skeletal mesh, the hand doesn’t move
    My Guns Skeleton

    BPI_AnimUpdate \ Left Hand Update


    Player Character Event tick (interface is implemented)

    BPI Function Logic in Player

    Setting the Left hand transform in ANIM event graph (also has BPI implemented)

    2 bone IK node with settings


    Fabik node with settings


    Hand position while simulating (doesn’t move with LeftHandSocket)

Thank you for your help
:slight_smile:

When I move my socket on my gun’s skeletal mesh, the hand doesn’t move

Hi,

I think there’s a misunderstanding about how the interaction between the socket and the hand works.

In your case, the socket on the weapon isn’t responsible for moving the hand; Saying the socket moves the hand is like saying a fingernail is responsible for moving the arm :sweat_smile:

The logic works the other way around: the arm moves the fingernail, and in this case, I think @L.F.A is the right one to help you!

I’m getting the location data from my weapon socket, converting it to bone space and then giving that data to my hand bone in my player. I’m not trying to animate the arm from a socket. They are in 2 separate objects,

I’m moving the weapon socket around in which changing the location the hand should be snapping too. In all the tutorials I watched, this worked for them, just not in my project

Hello,
You need the nodes Two bone IK and FABRIK, and you don’t need to connect that interface function to the event tick, because you’re already updating it inside the Anim BP.

Have you seen this tutorial?
How To Use IK To Fix Your Left Hand To A Weapon - Unreal Engine 5 Tutorial - YouTube

Thanks for the reply, yes that was one of the tutorials I watched. I already have two bone iK and Fabrik in my anim graph, you can reference them in the original post, perhaps I have a setting wrong in there?

No problem. Have you reached out the YT developer to check if he can help you out?

Let’s try to narrow it down. Have you followed the series to the letter or made changes on your own? Have you started with a blank TPS project? Identifying differences from your project and that one shown in the tutorial might help.

  • To start off, looks like the weapon socket is placed at root location. To verify, inside the weapon skeleton editor, move the weapon “lefthandsocket” far away from the root bone, let’s say, +50 Y and check if the initial hand position changes.

  • connect a print string node to the transform interface function and visualize if the transform is being updated inside the Animation BP. Sometimes, depending on how you connected the nodes, the current weapon actor reference will be null and the transform is not going to be updated.

  • Are you using a custom TPS project or Lyra Starter Game? If Lyra, the IK nodes will be different.

  • Are you spawning weapons in the world and attaching to the character, or using child actor components/skeletal meshes inside the Character BP? Perhaps the world space conversion will not work correctly with child actors. Try other space settings (bone, component, actor)

I’ll be out of town this weekend so I’m sharing other sources:

For lyra setup:

Using custom virtual bones, from 3DS Studio (discord (3S Game Studio)):
https://youtu.be/rCosEReF9J8?feature=shared

For virtual bones using meshes from Lyra in a custom project (starts at 15:33):

It’s not straightforward, perhaps you can reach out the developer in his discord server ({GameDevRaw};)

I figured it out, When getting socket bone name, it was only returning the root (left handsocket is a child to this). I just deleted this node and manually entered the name of the socket and it worked,

I can move my socket around now and update the hand while simulating!

Thanks for the help everyone

1 Like