I’m experimenting in Unreal Engine 5 with a first-person shooter, and I’ve set it up so that the weapon’s barrel in my character’s hands points precisely at the target. However, I’m not sure where two issues are coming from:
-
For some reason, my wrist—and therefore the weapon—ends up lying on its right side when the game starts.
-
If the target point is close to the character, the hand holding the weapon starts to shake significantly. And if you, so to speak, look “inside” a wall, the hand and weapon begin rotating. If you step away at just the right moment, the wrist rotation changes again until the next “ritual,” although aiming still works and the barrel remains pointed straight at the target. (You can even twist the wrist so it ends up in the correct position.)
I know how to avoid the second issue and can remove it at any moment. What I need to figure out is how to fix that initial sideways tilt of the wrist, and ideally, if the second error does occur, once it’s over, the wrist (with the weapon) should go back to its normal position rather than stay rotated.
These are the skeletal meshes with sockets that I’m using, along with my aiming logic. If you know how to fix it or if there’s another way to set this up, I’d be very grateful.
-
Meshes
-
BP Weapon and BP Character functions
-
ABP