Grab from collision

i want grab object from the geometry body or from the collision? how can I do that?
the only way I know is GetActorLocation(),
I’m new in the C++ cause that it would be great if you write code and some explanation. thanks.



Here is a tutorial that allows you to properly grab a component with a physics handle.


Thanks, for the reply, but that wasn’t my question.
first the link you send is in blueprint and second I wrote the code for garbing items in C++ and its work perfectly , but my problem is players must click on pivot point each object to grab object, I want to know there is any way player can click on any place on surface of object to grab it ?
this line of the code i wrote ( you can check it on question brief ) componenttograb->GetOwner()->GetActorLocation(), its sat grab location on pivot point of object .

I have a template I created that does this.

It allows grabbing of objects on any piece of the object. It also disables physics to allow for good handling but also keeps collision enabled.

thanks for replay but no matter I do while I want to unzip the file, I receive an error.