Is it possible to get the world location of an element in a 3D widget? For example, I have a widget that has 3 buttons. I would like to get the world location of each button.
I dont think u can get the location of a widget since its on the screen. But u can get the X and Y location on the detail panel and set a new X and Y location u want threw the blueprint.
I’m talking about getting the world location of a widget element from a 3d widget that is set to world space.
hmmm, I think this would be possible, what are you trying to do with it?
If you add a scene component or a box collision to the blueprint actor containing the widget, make this component a child of the widget if you want. then move it over the widget button in the blueprint actor editor
you could then get the world location of this box coliision or scene component
As far as i know theres no way of directly getting the position of a button in 3d space. I am sure with some clever maths you could find it though
Something like x,y widget translation multiplied by widget scale added to widget world location maybe?
I have a post process material that I don’t want to be applied to the 3d widget. So I’m using the custom depth buffer to mask out any part of the screen where a 3d widget is located, but widgets don’t write to the custom depth buffer. The only solution I’ve been able to come up with that works is to add a static mesh component that overlays each 3d widget element. I can then enable custom depth on the static mesh to mask out the 3d widget. I was hoping there was a way to get the world location of each 3d widget element so I could just code the static mesh components to snap to the 3d widget element. Since I can’t figure out or find a way to do this, I’m just manually placing and scaling each static mesh.