# OnClicked event not working with motion controller

**URL:** <https://forums.unrealengine.com/t/onclicked-event-not-working-with-motion-controller/393355>\
**Category:** Asset Creation\
**Tags:** Motion-Controller, VR-Vive, unreal-engine, onclicked, Blueprint, question\
**Created:** [May 12, 2017, 1:09pm UTC](https://forums.unrealengine.com/t/onclicked-event-not-working-with-motion-controller/393355 "2017-05-12T13:09:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_30fb26c9](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_30fb26c9](https://forums.unrealengine.com/u/anonymous_user_30fb26c9)\
**Post date:** [May 12, 2017, 1:09pm UTC](https://forums.unrealengine.com/t/onclicked-event-not-working-with-motion-controller/393355/1 "2017-05-12T13:09:27Z")

</div>

I’m trying to create a material change sequence of events in VR. I have the second part working where I can click on a widget button and change an objects materials, But I’m trying to make it so when you click on the object the widget appears.

I have the widget attached invisibly to my player pawn, in theory it will change visibility when an object is clicked on.

As I said, I can get the controller to click on buttons but I’m trying something as simple as printing a string when an object is clicked on, but it’s not responding to my static object.

I’ve tried everything I can think of and other peoples posts on the internet. I’ve made sure there’s a collision on the object. I’ve changed the Input\>Auto Receive Input to Player 0 in the blueprints. Nothing seems to be working.

If it helps, I have a red pointer debug coming off the controllers and when they hover over the widget a ball appears on the end (i’m guessing to show it’s hitting it) but there is no ball on my static mesh.

 ![137625-137622-player_collision_settings_test.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/4/a/14abbc924156219b8262e283670bcdb6e8be4e92.jpeg)

---

<div class="post-metadata">

**Author:** ![dreinzy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dreinzy](https://forums.unrealengine.com/u/dreinzy)\
**Post date:** [May 12, 2017, 2:14pm UTC](https://forums.unrealengine.com/t/onclicked-event-not-working-with-motion-controller/393355/2 "2017-05-12T14:14:13Z")

</div>

The red pointer you’re talking about is a Widget Interaction Component. It will only interact with Widgets. To interact with world objects you would probably use a Line Trace.  
The node you have in the screenshot would not work in VR afaik. That would be triggered if you clicked with a mouse cursor.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_30fb26c9](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_30fb26c9](https://forums.unrealengine.com/u/anonymous_user_30fb26c9)\
**Post date:** [May 12, 2017, 6:32pm UTC](https://forums.unrealengine.com/t/onclicked-event-not-working-with-motion-controller/393355/3 "2017-05-12T18:32:15Z")

</div>

Thanks for that. I now have a line trace coming off the controllers and successfully printing every actors display name. However I don’t know where to go from here, I need to make it so that when controller button is pressed and the line trace is hitting actor ‘X’ (for instance) then it toggles the widgets visibility. I can’t see anything about this on the internet. Can someone please point me in the right direction.
