How can I emulate a mouse in a specific 3D widget?

I am trying to create a virtual cursor that only appears and interacts with a specific widget in my game world. Assuming the mouse is out of the question for any purposes and I can supply a pair of xy coordinates for use via control stick on a game pad, how would I go about doing this?

You cant muhahahaha

Well that wasn’t particularly helpful.
I am talking about a simple controllable cursor that emulates all of the mouseover and mouse click events that the mouse does, but that I supply the widget local x,y for.

It appears that there was a plugin made with at least the analogue/custom xy input in mind a while ago: Rama & Nick’s Plugin, however, I am still uncertain as to how I can constrain the position of the cursor to a position inside the widget I have focused.
Would I need to project from widget to screen? After this how would I lock it to inside the widget?

Despite what Stunt Thumper said, it is possible. There are tw legs to achieve it. The first one is to to create a fake mouse image that would replicate the mouse movement. Then you create custom events whose pina will be tied to the same output nodes a s onclicked events. The last thing you’ll have to do is fire an event on mouse click, get the fake mouse’s location on the widget and see if it’s within the bounds of a button. The information on where a button starts and ends can be achieved by using a “slot as canvas” node. It would give you the location of the button on the screen and its width and height.

Using this method, I suppose I could simply write a button class override that takes mouseover and click events from the emulated cursor. Would that be the most effective way to do this?

Finally one of my guys discovers an answer…celebration and maybe a raise is in order. Okay celebration will have to suffice.

I have found another solution! I would have taken yours but it was reliant too much on limiting my widget to using canvases and canvas slots. Thank you for your feedback, it was excellent food for thought!

Opening this back up. Once again the Unreal Editor has succeeded in convincing me that something will work, when it doesn’t actually work. In a packaged build of the game, it runs and displays my virtual mouse cursor over my widget, it even processes input correctly thanks to some reworked gamepad input processor code. It simply does not perform correct collision detection with my virtual cursor and the 3D widgets.
How can I do this? I have been whacking at it a while now and maybe I am just thinking about it wrong.

So I have been digging deeper and deeper into the Slate Application, Widget, and Widget Component code but I still can’t find any way to tell the 3D widget the simple message of “This is where your cursor is”. I find that as a VR capable engine this would likely be something that engine developers would like to address? It honestly seems less and less possible the more I learn about the way Slate works and I am starting to lose hope on a simple fix. Getnamo has found a really clever workaround on the with his project, but it has its limitations as well. I have even sent questions to those I believe to be authorities on this matter, but to no avail. Somebody save me!

After talking briefly with Nick Darnell about this: “Slate can’t (couldn’t) easily do it without a bunch of mods, I’ve slowly been introducing them to get this to a point others can make easy use of it. The primary issue is that Slate Application was not ok with other code pretending to be a mouse.” Which turns out to be totally, painfully true in almost every way. Right now however, I have managed to get by with a few mods to WidgetComponent, SButton, and HitTestGrid.
The result can be seen here, but it is still definitely not ideal and with any luck we will see far improved solutions come 4.11 or later.

Conclusion: Its possible to do, but not at all easy, or even fully functional. Let’s hope for the future!

你好,之前得到过你的回复,我碰到了个关于贴花的问题,贴花拐角处会拉伸,不知道怎么解决这个问题?我qq是784190772 或者你告诉我你的qq 我加你一下?

Can we arrange you to the EG? Maybe they clean this hole after that…