# How to cast a ray trace from a 2d widget location? Or check for widget overlap?

**URL:** <https://forums.unrealengine.com/t/how-to-cast-a-ray-trace-from-a-2d-widget-location-or-check-for-widget-overlap/35981>\
**Category:** Blueprint\
**Tags:** unreal-engine\
**Created:** [July 20, 2015, 3:55pm UTC](https://forums.unrealengine.com/t/how-to-cast-a-ray-trace-from-a-2d-widget-location-or-check-for-widget-overlap/35981 "2015-07-20T15:55:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mcgillchris](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mcgillchris](https://forums.unrealengine.com/u/mcgillchris)\
**Post date:** [July 20, 2015, 3:55pm UTC](https://forums.unrealengine.com/t/how-to-cast-a-ray-trace-from-a-2d-widget-location-or-check-for-widget-overlap/35981/1 "2015-07-20T15:55:50Z")

</div>

The adventure continues.

I’ve got a 2d widget moving around like a cursor with my gamepad (thanks to some great forum help), and now I need to do a ray trace from its location to check for collision behind it. Alternatively if I could check for specific widget overlaps, I could make it work as well.

Here’s what I have right now. I know its not right, but I was checking to make sure it was returning the correct thing. This is coming off event tick on a actor blueprint I’ve attached to my character. The "mouse collision is the collision sphere I want to check and see if my cursor is over.

Thanks!

 ![Screen Shot 2015-07-20 at 11.53.56 AM.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/4/7/475a4c1084903a6d55f384d0ec21e8857ada97b7.png)
