# Grab from collision

**URL:** <https://forums.unrealengine.com/t/grab-from-collision/428256>\
**Category:** World Creation\
**Tags:** unreal-engine, Physics, CPP, question\
**Created:** [June 27, 2018, 11:24pm UTC](https://forums.unrealengine.com/t/grab-from-collision/428256 "2018-06-27T23:24:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![AAriyAA](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AAriyAA](https://forums.unrealengine.com/u/AAriyAA)\
**Post date:** [June 27, 2018, 11:24pm UTC](https://forums.unrealengine.com/t/grab-from-collision/428256/1 "2018-06-27T23:24:59Z")

</div>

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.

```
PhysicHandle->GrabComponent(
			componenttograb,
			NAME_None,
			componenttograb->GetOwner()->GetActorLocation(),
			true
```

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e60ebe5f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e60ebe5f](https://forums.unrealengine.com/u/anonymous_user_e60ebe5f)\
**Post date:** [June 28, 2018, 6:04pm UTC](https://forums.unrealengine.com/t/grab-from-collision/428256/2 "2018-06-28T18:04:07Z")

</div>

Hello,

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

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — https://unrealcommunity.wiki/! You will be able to find content from...

Thanks,

---

<div class="post-metadata">

**Author:** ![AAriyAA](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AAriyAA](https://forums.unrealengine.com/u/AAriyAA)\
**Post date:** [June 29, 2018, 6:38pm UTC](https://forums.unrealengine.com/t/grab-from-collision/428256/3 "2018-06-29T18:38:38Z")

</div>

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 .

---

<div class="post-metadata">

**Author:** ![Katianie](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Katianie](https://forums.unrealengine.com/u/Katianie)\
**Post date:** [July 5, 2018, 2:18pm UTC](https://forums.unrealengine.com/t/grab-from-collision/428256/4 "2018-07-05T14:18:57Z")

</div>

I have a template I created that does this. [http://katianie.com/SourceCode/Unreal/VRGrabbing.zip](http://katianie.com/SourceCode/Unreal/VRGrabbing.zip)

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.

---

<div class="post-metadata">

**Author:** ![AAriyAA](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AAriyAA](https://forums.unrealengine.com/u/AAriyAA)\
**Post date:** [July 8, 2018, 6:33pm UTC](https://forums.unrealengine.com/t/grab-from-collision/428256/5 "2018-07-08T18:33:32Z")

</div>

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