Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

OnClicked event not working with motion controller

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.alt text

Product Version: UE 4.14
more ▼

asked May 12 '17 at 01:09 PM in VR

avatar image

7 2 3 5

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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.

more ▼

answered May 12 '17 at 02:14 PM

avatar image

26 1 4 5

avatar image Leafbob May 12 '17 at 06:32 PM

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.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question