Need help : picking up and attaching object to socket

Hello everyone,

I’m new to this, been reading and watching every tutorial i could find, but i can’t see what i’m doing wrong.

So, i want my character to be able to pick up a specific object (The_Ball) by clicking LeftMouse when The_Ball overlaps with my character’s ‘Grab_Ball’ collision box and attach it to a socket. Problem : when i click, the ball moves to the right position, but doesnt stick there and falls through the floor. Here’s what my BP looks like so far :

Function Grab_Ball :

And calling it with left click:
UE4_trouble3.png

Actors, components, meshes, this is quite confusing to me.

Thanks for your help!

Hey, the issue here is that while the ball is attached to the socket, physics are still active on it. Try calling Deactivate on the ball when attaching and Activate on the ball when detaching. You can also try SetEnablePhysics(false / true).

That’s what i think too, but i don’t have access to that option for my variable. I think it’s because it refers to an actor while it should be the mesh component of that actor. But i don’t know how to have acces to the ball mesh here because i’m in the character blueprint.
Maybe i just did this completly wrong :smiley:

Ok, it now works, but i’m really not sure my method is the right one But that’s how you learn :smiley:

Here’s what i did