Mouse Position doesnt update while pressing a button

I am making an interactable computer. I am setting Mouse position values ​​to variable with “OnMouseMove” Function. But when i click any button, “OnMouseMove” function doesnt work until i release it. So i cant hold and drag my windows in interactable PC. Any advice to solve it?

Try this:

I hope it’ll be helpful for you.

My Products

1 Like


I use these to set it to variable, how can i do it with functions you sent?

Button Pressed → Start Dragging

Button Released → End Dragging

1 Like

Thanks four your interest, but my widget is 3D. It is on a monitor screen and not on player screen. So will it work for mine? As far as i see you just use viewport position, not position on widget.

Try to use Drag’n’Drop Operation.

It’ll work.

2 Likes

Thanks, it works. But i have another problem with this system. Drag drop operations add widgets to viewport. I have searched so much about drag operations on 3D widget but havent find anything. It should be on 3D widget but i couldnt do it. Here a video:

Video

MoveVirtualWidget

I’ve tried to resolve the issue myself and found the following solution:

  1. Create a separate blueprint actor to find the virtual mouse position:

image

  1. Add the following function to the actor:

  1. Organize your widget blueprint like this:

I’ve found a more straightforward solution:

Use OnDragOver:

And it’s working.

Thanks for your interest! :slight_smile: It works perfect.