I have a project that has a somewhat simple weapon system; where the player is able to pick up weapons by entering their vicinity, when a weapon is equipped, the game deletes the weapon blueprint on the floor and then spawns two on the player (one for a first person rig and one for a third person rig), it then sets the player as the newly spawned weapon’s owner and then attaches the weapon to the player’s right hand socket.
Using this, I’ve tried to implement a simple left hand IK for the third person rig so that it makes it look like the player actually holds the gun for other players. However, for some reason the hand isn’t going to the desired transforms, and with multiple debugging attempts where I have checked whether the weapon is valid, checked if the transforms are updating and checking the actual transform of the socket to compare with the transforms of where the hand is actually going; its safe to say I have no clue what is going on. everything should be working perfectly according to documentations, but it just isn’t…
Here is the code i currently have (with context)
[Weapon equip code]
(Code that runs when you enter a weapons vicinity)
[setting looted weapon notify]
(the top one is the one i’m focusing on in this post)
[LHIK function]
(Note: This function is later called inside the animation blueprint event graph. Transforms are then stored in a replicated variable named “Effector Transform”)
[Applying the Transforms to both a Two Bone IK node and a Fabrik node]
[Two Bone IK settings]
[FABRIK Settings]
it produces this abomination:
(The hand should be on the handguard according to the LHIK sockets transform.)
[The sockets transform]
(Btw if your wondering why there is not a stock on the gun in the game, its because I haven’t set up the attachments system yet, ALSO: the LHIK is NOT parented to the root, its parented to the foregrip bone and has a relative location of 0, so it is ON the foregrip bone)
Ive checked all bone names and i don’t know what could be happening. If someone could help me figure this out, it would be amazing.
Thanks