Hello guys, I’m new to UE5. I encountered a problem when I tried to attach a weapon to my character.
My Environment
-
Version: 5.6
-
Character BP: The example 6. BP_FirstPersonCharacter with some added functions, components, and events (I have excluded the influence of these added things and modified configs). There are two meshes by default: a Mesh with a FirstPersonMesh:
-
Skeletal Mesh Asset: the skeletal mesh assets of both meshes are set as SKM_Manny_Simple by default, and I did not modify them:
-
Animation BP: Default (The mesh uses ABP_Unarmed and the FirstPersonMesh uses ABP_FP)
-
What I want
Attach a weapon to my character. Specifically, I want to attach a crowbar to my character and watch it correctly being held by the right hand.
What I did
-
I add a socket “Crowbar” on the bone “hand-r” of my skeleton mesh, and adjust the socket to make sure the crowbar is correctly held in the animation preview, e.g.:
-
I defined a BP interface (BPI_Interact) and added a function called OnEquipped to it.
-
I realize the function in my weapon base class (BP_Weapon_Base) like this:
-
I call the message OnEquipped in my Character BP like this:
-
I triggered the input action IA_Equip.
What happened
The crowbar is successfully attached to my character. But the position is only right in the shadow (I guess it is the ThirdPersonMesh) and is wrong in my first-person view, like this:
And I do not know how to fix it.
What I tried and found
- I attempted to modify the parent of the “attach component to component” node from Mesh to FirstPersonMesh. But the result is that the positions are wrong in both the shadow and the first-person view, like this:
- It seems that the problem is related to the ABP used in my Character BP. When I change the ABP of the FirstPersonMesh to the same as in the root Mesh (both ABP_Unarmed). The problem seems temporarily solved, but I can not see my right hand in my first-person view, like this:
- I also observe a similar question in https://www.reddit.com/r/UnrealEngine5/comments/1m5d6h2/issue_with_attaching_actor_to_character_socket/, but there seems not exist a clear answer.
My question
Is that normal? Should I add or modify some ABP or other files? Or what configs should I adjust?
Thanks for your time!
Update: 2025-10-1
I found that the problem is caused by the predefined control rig in ABP_FP.
When I cancel the link to Control Rig, the anime returns normal (although I can not see my right hand when I stand because the rig ctrl is lost for FP view). But I still confused about why the socket is not transformed along with the bone in the control rig? The ABP_FP anime preview is normal:
But in simulation it failed.