# Ray Cast +Physics Handle

**URL:** <https://forums.unrealengine.com/t/ray-cast-physics-handle/304140>\
**Category:** World Creation\
**Tags:** unreal-engine, Physics, UE4, question\
**Created:** [January 16, 2015, 1:37pm UTC](https://forums.unrealengine.com/t/ray-cast-physics-handle/304140 "2015-01-16T13:37:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hraxzy94](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Hraxzy94](https://forums.unrealengine.com/u/Hraxzy94)\
**Post date:** [January 16, 2015, 1:37pm UTC](https://forums.unrealengine.com/t/ray-cast-physics-handle/304140/1 "2015-01-16T13:37:42Z")

</div>

I’ve set up a simple pick up mechanic using a ray cast and physics objects but when I turn the player the object in hand offsets and doesn’t follow my rotation.

Any ideas as to fixing this ?

---

<div class="post-metadata">

**Author:** ![Hraxzy94](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Hraxzy94](https://forums.unrealengine.com/u/Hraxzy94)\
**Post date:** [January 16, 2015, 1:41pm UTC](https://forums.unrealengine.com/t/ray-cast-physics-handle/304140/2 "2015-01-16T13:41:37Z")

</div>

![26871-in+hand.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/9/0/590bde3dbe6684778159d47adbe506795c6353cb.jpeg)

this is the object when I first pick it up.

and when I rotate, it goes off at an angle

 ![26872-rotation.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/3/3/83374df2b59b0572c047a3bb50ce4753f5c4a30f.jpeg)

---

<div class="post-metadata">

**Author:** ![TJ\_V](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tj_v/32/1008648_2.png) [@TJ\_V](https://forums.unrealengine.com/u/TJ_V)\
**Post date:** [January 16, 2015, 4:57pm UTC](https://forums.unrealengine.com/t/ray-cast-physics-handle/304140/3 "2015-01-16T16:57:32Z")

</div>

Hi Hraxzy94,

Take a look at this tutorial I created on the Epic Wiki. There is certain math that you need to do in order to keep the object in front of the player.

> **[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...

Let me know if this works for you or not.

Cheers,

TJ
