Jiggle bone's strange physics movement and how to solve it

Hey guys, I would like to ask about my physics constraints problem when applied to parts of FPS weapons (as you can see in the example that I am providing below) but also to parts of armour, for example: a helmet jumping up and down while running, hair strands swaying etc. To clarify what jiggle bones are or what I want to achieve, this is quite a show-off from Team Fotress 2: - I got this video from a different post on AnswerHUB . I followed the video from the post but at the end I guess my workflow was a bit different. For one thing, the gun’s part that I want to move with a jiggle bone is a part of the skeletal mesh (not a separate mesh) as it is also used in the gun’s animations (so not only physically controlled but both - but it is either one or the other, never both at the same time) and its movement is much simpler than that in the video. Now, from all the information that I gathered - read documentation/tutorials, videos on Youtube - when I want to create certain physics-using props attached on my weapons I am supposed to do so using physics constraints. These props are not supposed to interact with anything, only gravity (perhaps collision with other parts of the object) should be applied, so they are just for decoration.

Video link:

In the provided video, you can see an unfinished flintlock pistol used as a bashing melee weapon. When used this way, the “frizzle” (frizzle is the RED part of the gun) is actually supposed to sway up and down naturally as there is nothing locking it in place but should mostly stay down (open) as the weight should push it down. The gun itself is one skeletal mesh with 5 bones - although only two bones are really used in Unreal’s PhAT tool at the moment -> “grip_joint” (the main parent) and “frizzle_joint” (bound only to the gun’s frizzle) - moving the frizzle is now my objective. The bones “M” and “root_joint” are only parents of the “grip_joint” and no vertex is weighted to them (they are redundant, I used them only for testing purposes), only “grip_joint” is the first parent actually used for skinning. I set the collision bodies of “grip_joint” bone to encompass the whole pistol. The way I created “frizzle_joint”'s collision bodies was more or less experimental to achieve the wanted result. Unreal created a physics constraint at the place of the frizzle bone itself so I just locked X and Z axis in the angular limits (Swing1Motion, Swing2Motion), limited Y(Twist) axis to 45 degrees and rotated it to get the proper angular movement limits on the frizzle. But also, the frizzle is not supposed to use a spring (Soft) movement but a metal-like movement - that is why I disabled “Soft Constraint” in Twist Limits (screenshot “pistol_phy_asset_constraint.png”) . I disabled collision of the frizzle bodies with physical bodies on the grip because they overlap a little, in my current case, I only want gravity and outside forces (weapon swaying) to affect the physical movement in the constraint’s limits. When I simulated the physics inside PhAT tool by applying force/impulse with CTRL+right_mouse, it kind of seems to work. The gravity on the “frizzle_joint” bodies is activated. In the skeletal mesh component for the pistol, I did NOT enable “Simulate physics”, as I did not want the whole gun to be affected by physics (only the frizzle).


What I achieved actually works, however, the frizzle’s movement looks really strange. When I turn to sides, the frizzle returns to its original position. Sometimes it just stays up (or moves up and down) without any direct cause (at least none that I can see). As the gun is always in an almost vertical position (as can be seen on the screenshot of character blueprint with camera), the frizzle should always open/fall down but it does not. I thought I was supposed to tinker with the values of Mass or Centre of gravity to get what I want, unfortunately after many attempts, I did not see any difference that would make. I also thought about one thing - and that is if I can move the constraint limit centre marker to the sides (which would be more representative of the frizzle’s starting position - screenshot “pistol_constraint_limit_centre_change.png”) but I guess that cannot be done and does not even matter.


My question is this: am I on the right track and I just have to tweak to constraint parameters a little more ? Or am I doing something that is not meant for this kind of situation ? I am thankful for any hint that can push me forward. Also, in the video, when I made a quick turn with the character, it can be seen that the bone constraint actually moved outside of bounded axis (the bone jumps). Is this normal or is there something that can prevent this ?

I apologize for this much text, I wanted to be as specific as possible - to add a bit more, I already asked this question on AnswerHUB but with no answer. Thank you very much.

P.S.: if anyone wondered, I am using FPS arms and their animations from Ironbelly available at Unreal Marketplace.