Who owns component once it's detached

Let’s say I have a VR project with a cube that can be picked up. It’s initially an Actor with a Static Mesh for its Root Component, and a GrabComponent as a child to the static mesh that has the pickup logic. When you grab the cube, it does an AttachToComponent to attach the Static Mesh to the motion controller component of your hand.

When you release the cube, it does a DetachFromComponent. The mesh stays in the scene, but is no longer attached to an actor? How does that work? And what happens to the original actor that had its root component taken from it? Is it deleted when it loses that?

Answered my own question with some logging. Ownership doesn’t actually transfer when you do AttachToComponent. The original owner of the mesh remains the same throughout the process.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.