Why mouse speed is higher then border set position when drag&drop?

Why mouse speed is higher then border set position when drag&drop?

Why border jump’s when i set it position?

How to fix it all?

22149-a.gif

Hey! Anybody hear me?)

Hello, can anybody answer me??))

Hello ,

I have setup that will allow you to drag a widget without the lag issue that you have posted.

Things that you will need:

  1. Two float variables (CanvasX and CanvasY)
  2. One Boolean Variable
  3. One widget
  4. One Mouse Down event
  5. On Mouse Move event
  6. On Mouse Up event

The On Mouse Down event:

You will need to create you Boolean here.

The On Mouse Move event:

You will need to make Two float variables here.

The On Mouse Up event:

I hope this helps.

Make it a great day.

fantastic. thanks for help.

Canvas X and Canvas Y it’s position of widget?

Hello ,

After reviewing my blueprint I see that I left in some obsolete code. The Variables Canvas X and Canvas Y will not be needed. The blueprint should look like this:

I’m a little upgraded code. Now do not need anything extra.

I am happy to hear that you have it working. Congrats.

But why the mouse is moving faster than the window itself? This is somewhat justified?

Hello ,

It was most likely due to a combination of things.

  • Mouse position to Widget position not being a 1:1 ratio
  • The widget was being updated on tick essentially and so it was always one frame behind the mouse. This means that if the mouse moved further than then width of the widget in one frame that it would drop the widget because it is no longer over the widget (OnDragOver would no longer be recognized as true)
  • Back to the Mouse position and Widget Position not always being 1:1, This could also cause the widget to move to a position that it thinks the mouse is set to but instead bounce it away from the mouse far enough that the mouse would no longer be over the widget and in effect halting the drag function.