Machine Skeletal Mesh with Physics Asset, how to drop it with gravity ON without breaking the bones/physics assets?

Intended Behaviour

I want to be able to pick up a Skeletal Mesh that has a Physics Assets and drop it anywhere, letting them fall with gravity.

I am already able to pickup and drop, but see the problem below.

Problem

The problem is that when dropping it, the bones (or the physics assets) get broken:

As a comparison, I have another Skeletal Mesh machine that does not break apart:

Setup

I have a machine which is a skeletal mesh:

The skeletal mesh has a physics assets, in order for it to be interactable, also the physics collision shape matches the crank position when the crank is moving animated:

Pickup Code:

  • I attach the SK mesh to my player hand component, then I attach the Machine Actor to my player
  • Set Simulate Physics: false
  • Weld Simulated Bodies: true

Drop:

  • Detach Machine Actor from player hand
  • Attach SK mesh back to Machine Actor
  • Simulate Physics: true
  • I’m not using Set All Bodies Simulate Physics because I don’t want the machine to act like a ragdoll, I just want it to react to gravity.

Question

  1. How to be able to drop skeletal meshes with gravity on, while keeping the colliders and bones together?
  2. Any special setup I have to be aware to be able to pickup and drop skeletal meshes just like static meshes?

I considering creating a StaticMesh to represent the asset when dragging and dropping, but then you can assigned an imported SkeletalMesh to a StaticMesh.

This is my first time ever dealing with simulated skeletal meshes. I had no idea I would need Physics Constraints:

I’ll learn about it and implement them and report back here if they work.

I added a constraint, to keep the crank attached to the body of the machine:

I have an animation to spin the machine:

I set the Crank bone to Kinematic, so the animation can drive the physics asset:
imagen

But then this happens, the crank and handle turn extremely tiny while animating + simulating physics. I tried tweaking every possible value, but I can’t find any way to fix this. Any idea?

I have no words. Adding the constraint and setting the crank to Kinematic, then playing the skeletal mesh animation… causes this (there’s no code driving such behaviour, and it was supposed to fall with gravity, it’s not attached to anything):

My machines are Skeletal Meshes, because they move gears, cranks, etc with bones, and considering what I want to do, they still have to be Skeletal Meshes. But dragging and dropping them around as rigid bodies turned out to be almost impossible or extremely bugged.

So I changed how I approach this:

  • I don’t drag Skeletal Meshes around anymore, I take a snapshot of the Skeletal Mesh with “Make Static Mesh”
  • Then when a machine is dragged, I assign the snapshot as the dragged static mesh.
  • When the machine is dropped, it’s still the skeletal mesh falling with gravity.
  • The machines Skeletal Meshes are not affected by gravity anymore.
  • Only when a machine is “installed” that it’s switched back to its skeletal mesh.

It’s not exactly how I envisioned for me game (I wanted to be able to drag and drop machines around, and they would be supposed to work even flipped on the ground), but in the end this is how every survival and/or simulator game does - machines and mechanisms need to be “installed”/snapped to be used.

I’m not marking the question as solved, because I still want to discover how to drag skeletal meshes around, but for now, I’m moving forward like this.