Hi. I’m trying to figure out how I can place lights into the world and drag them around from my minimap widget? Is there some sort of way to detect clicks from the world in the minimap? I already have objects that are able to face a point with a vector, and my minimap works just fine, but I’m not sure how I can detect clicks and drags through the widget.
If you skip to 1:15 you can see what I’m talking about. They have a drag-able light and a point it focuses on.
You can detect clicking on the world map by putting a clear widget button on top of it, and then detecting the cursor location on click. (remember to zero out the alpha on all the button images Normal, Highlight, Pressed, etc.) Then to drag you’ll need to use the Drag and Drop system built-in to Unreal. It has parameters to clip your object within the bounds of the map, drag the object around responsively, and then detect when it is dropped. There is a problem you’ll need to work around to have the drag update in real-time if your mini-map is not a widget, I don’t imagine it isn’t, but heads up tracing into the world on drag is a pain due to input state. This tutorial is goofy named, but seems the best explanation I’ve found on this system. Beyond that it sounds like you have the difficult stuff figured out, translating from mini-map space to world space and accurate HUD waypoints is the tricky bit.
I posted a solution hours ago but it’s pending moderation. It’s a pretty straightforward onMouseMove override where you translate widget geometry into world space.
Sir can you help i made this but its not changing town id, for each id theres an array of four locations and the widget has 4 buttons but when i click on widget in vr the town id doesnt change and am stuck at the first town 4 locations
I dont know if its failing to cast, i attached print string to the widgetBP nothing gets print, also i looked some tutorials they did that press pointer key and release pointer key which i also implemented, am testing in oculus quest 2 the map is hoverable and collision also good but it doesnt click