Issue when simulating physics on pick-up and drop system

Hello, I am using Unreal Engine 5.5, and I am trying to create a pick-up and drop system using a Blueprint interface. First, I will explain the mechanic, then address the issue, and finally provide the code and videos for better understanding.

The pick-up system works as follows:
In the BP_FirstPersonCharacter, I have used the node “Left Mouse Button.” On Pressed, it shoots a line trace from the player’s camera and checks if the hit object implements the interface. If it does, I call the “Sim Physics (message)” function from the interface, which has a boolean input that I set to false (unchecked). Then, I attach the actor to a component. On Release of the left mouse button, I call the “Sim Physics” function again and set the boolean to true, then detach the actor.

This is the behavior I am aiming for, and I believe it is simple enough. I have placed an actor with the interface in the level, and the system works the first time I try it. However, after the initial use, it stops working. It seems that after enabling simulate physics, the actor won’t attach or move anymore. I have also tried using the “Set Actor Location” node for testing purposes, but this did not work either. It’s as if the mesh is in a static state instead of being movable.

Here is all of the code.

Pick-up and drop item code:

Inside interface:

Item actor code:

This is a video of the issue:

I have also tested the same code in other versions of Unreal Engine, such as 5.4 and 5.1, and it still produces the same result. I’m not sure if this is a bug in Unreal Engine or if I’m missing something. If anyone knows what is causing the issue, please let me know.
Thank you in advance!

I’ve tried this.

It all works fine, apart from the attach for some reason…

I can push the cube where I want unless I hold down the mouse button.

Clicking on the cube works, even when it’s remote from the pivot point.

What’s the component structure of the Actor? This matters when using physics. I have a feeling you have a scene component as root. When you enable physics on the mesh component it is detached from the root component. The Root and all other components not “Attached” to the mesh will stay at their world location.

Yep, that was the problem. In my item bp actor I had the DefaultSceneRoot as a parent. It’s okay if i remove it tho and have only my mesh, right?

You can still keep the root component. Just need to update its location to match the mesh (and any relative offsets) once the physics state goes to sleep. Root component needs to be “Moveable”.