I’m struggling to get a physics constraint component working between a skeletal mesh and a static mesh in unreal engine 5.6 or 5.7.
I’ve tried repeatedly, in clean projects and levels, just making an example from scratch. Using two boxes. One should hang from the other. I want a skeletal mesh to remain stationary. I want a static mesh to “pivot” around a point on that skeletal mesh, based on a bone. (using the PhysicsConstraint.)
Whenever I do this, everything works correctly, except the static mesh pivots about the world origin, not my skeletal mesh bone. I have worked all day, scouring the internet for info, and working with copilot and with the Unreal AI assistant to try to debug this. Building all sorts of debug output apparatus to evaluate to try to identify where it’s breaking. It appears I’m setting it up right, and it should be working, but it /consistently/ doesn’t work. I can set up the same exact scenario, except with another static mesh instead of the skeletal mesh, and that works great. I just don’t need to specify a bone in that case, because it’s a static mesh. This works 100% as expected. But the version right next to that, with a skeletal mesh and a static mesh won’t work right nomatter what I do. I know that the names are set right in the physicsconstraint component, because my two meshes have a red and a blue box around them. I know the bone name is correct because if you give it a bad bone name, the component spams the output log with messages that the bone can’t be found.
It really appears that the PhysicsConstraint component is broken. I’m assuming that’s not actually the case, as I’m also assuming this functionality is used a lot in different games. But I’m stumped and frustrated.
I’ve tried all the usual stuff: physics simulation off for the skeletal mesh, on for the static mesh. The skeletal mesh has physics, and collision data. The static mesh has collision. The names of the meshes and bone are set right in the PhysicsConstraint. Nothing else is touching anything in the scene; this is a vanilla untouched project/level, with no plugins that aren’t there by default. Both meshes have collision, but they are /definitely/ not intersecting. It’s not like the mesh pops back and forth to the world origin, it’s happily swinging away there.
If anyone can make a level with a blueprint containing a skeletal mesh, a static mesh, and a PhysicsConstraint that makes the static mesh stick to the skeletal mesh, please let me know. I’ve tried every way I can think of doing it, but I cannot make this work.
Thanks!