Carrying objects interaction

Hi there,

I am creating this function to grab items by pressing E and also adding a PhysicConstraint in the capsule component. My item has simulated physical activity and with a mass of 30kg it flies away when I press E, any ideas what could be wrong with the physics, please?

I used exactly this tutorial, kindly note, my character is relatively small, so I increased the weight of the item (otherwise I would fly even further lol!)

Thank you for your time and help.


Do you have collision on the player mesh that could be colliding with the object you are picking up?

1 Like

I think so, are you referring to these?
Thank you for your help

Depending on how you have collision setup, for example, just a capsule component, or different collision boxes on certain parts of the mesh, like on the hands, the object being picked up may be clipping into a collision shape on the player mesh, causing it to go flying.

I recently discovered some of the how shall we say “challenges” in having a character pick up and object, drop it or throw it, then pick it up again. Most of the threads concerning this seem to suggest that physics has to be turned off when you attach / pick up, then back on obviously when you drop or throw the object. Then back off again to pick up and do it again. The threads seem to mention that if the object has more than one component (example a static mesh, and two box collisions) that during this process the mesh becomes detached from the others. In a beat em up type game, I had a barrel the character could pick up and throw. I was having an issue of once you pick up and throw, you couldn’t pick it up again. The current solution was to make a barrel actor bp and just have the static mesh as the root component. The threads also suggested making the mesh the root component to stop the unparenting.

If having the character pick up that box and carry it is your end goal. I would suggest making a socket in the character’s right hand. Then have a pick up animation. The moment the attach is made the cube will appear in the character’s hand. For me I had to toggle visibility and use a delay so the picked up object appears in the character’s hands while lifting up from the ground not moving down. Try setting collision and physics off on the cube while you attach, reenable when you detach. Try to keep the mesh of the cube as the cubes root component.