Working on creating a 3D umg menu for changing materials on objects

As the titles says, I am currently working on a 3D umg menu that will allow me to change materials on certain objects depending on what button I click. It currently only works if it is set up as a 2d menu. I have been researching blueprint communications, and different methods to get it to work with my 3d umg menu actor but I have no had luck. While looking through various threads/answerhub questions I have come across similar issues but I am still stumped as to what I am doing wrong. Any help would be greatly appreciated it! Down below are some screenshots showing what I am trying to do, and what my blueprints look like.

First Attachment: UMG Widget Blueprint
Second Attachment: UMG Actor Blueprint
Third Attachment: Level Blueprint
Gif: Shows how it currently works
Last Attachment: 3D Menu that doesnt work

Are you attaching the widget as a component?

You must create an actor blueprint, add the widget as a widget component, then use your code here after setting up the component:

&stc=1&d=1468777637 (BUT: remove the create widget from class, you don’t need that).

See here for info on adding widget component: 2. Setting up the Actor Blueprint | Unreal Engine Documentation

Yes, I am attaching the widget as a component for the blueprint actor I created for the UMG menu. I will remove the create widget and see if that helps. Thank you for the advice!

Correct me if I’m wrong, but don’t you need to cast it? Widget > GetUserWidgetObject > Cast to MaterialUMG

Hm. I am not sure to be honest. I am very to new to this but I thought I remembered reading that widgets are now precasted. It’s definitely possible that I misunderstood what I read in regards to widgets being precasted.

I tried both of your guys suggestions but zero luck. Chances are I am doing something simple incorrectly but at least I am learning a lot! I will keep at it.

Had a go at the 3D UMG tutorial that Epic provided, seems like its not working as intended. Upon further Googling, seems like we are not the only ones having interaction problems w.r.t. 3D UMG interaction:
https://answers.unrealengine.com/questions/298261/cannot-interact-with-3d-umg-button.html

A few workarounds I could think of:

  1. Make your own 3D static mesh button (just a thin extrusion from a plane will do) and give each of them its own material, then use collision detection or raytracing to detect object selection to call the material change.

  2. Detect the position of the 2D widget using a forward vector. Grab the camera world location, add its forward vector multiplied by a certain factor you prefer (this will give you approximate distance away from the widget to detect it), then do a boolean comparison of the final vector and the widget world location in the event tick. If you want to do a highlight instead of triggering the material change, you could just change the color properties upon detection and set a keyboard event to trigger the material change when detected.

Until Epic has a permanent solution to 3D UMG, we can only rely on hacks/workarounds to make it work.

Had a go at the 3D UMG tutorial that Epic provided, seems like its not working as intended. Upon further Googling, seems like we are not the only ones having interaction problems w.r.t. 3D UMG interaction:
https://answers.unrealengine.com/questions/298261/cannot-interact-with-3d-umg-button.html

A few workarounds I could think of:

  1. Make your own 3D static mesh button (just a thin extrusion from a plane will do) and give each of them its own material, then use collision detection or raytracing to detect object selection to call the material change.

  2. Detect the position of the 2D widget using a forward vector. Grab the camera world location, add its forward vector multiplied by a certain factor you prefer (this will give you approximate distance away from the widget to detect it), then do a boolean comparison of the final vector and the widget world location in the event tick. If you want to do a highlight instead of triggering the material change, you could just change the color properties upon detection and set a keyboard event to trigger the material change when detected.

Until Epic has a permanent solution to 3D UMG, we can only rely on hacks/workarounds to make it work.
[/QUOTE]

It’s nice to see I am not the only one having the issue. Hopefully they iron out the issues/bugs with the 3D UMGs. Once I am off work I will try both suggestions and post my results. Thank you for the help!

Hi guys, sorry for the little bump, I am right now in the same problem.

I have a fully 2D menu working, but when I try to convert in 3D for VR mode, doesn´t work, homrighausen3d, finally you got a solution for that?

Thank you :wink:

Hey guys,

If it can be of any help I made a video on how to use the widget interaction component for interacting with a 3D menu that you can toggle on and off during runtime

Really hope this can help somebody :slight_smile: