x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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?

alt text alt text alt text alt text

Product Version: Not Selected
Tags:
more ▼

asked Nov 25 '14 at 04:28 PM in Blueprint Scripting

avatar image

fractalzombie
11 2 4 7

avatar image fractalzombie Nov 26 '14 at 09:42 PM

Hey! Anybody hear me?)

avatar image fractalzombie Nov 29 '14 at 03:42 PM

Hello, can anybody answer me??))

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hello fractalzombie,

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.

alt text

The On Mouse Move event:

You will need to make Two float variables here.

alt text

The On Mouse Up event:

alt text

I hope this helps.

Make it a great day.

more ▼

answered Dec 01 '14 at 11:10 PM

avatar image

Rudy Q ♦♦ STAFF
47.3k 545 132 525

avatar image fractalzombie Dec 04 '14 at 12:37 AM

fantastic. thanks for help.

avatar image fractalzombie Dec 04 '14 at 01:06 AM

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

avatar image Rudy Q ♦♦ STAFF Dec 04 '14 at 03:29 PM

Hello fractalzombie,

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:

alt text

draghelp5.png (207.1 kB)
avatar image fractalzombie Dec 04 '14 at 09:33 PM

I'm a little upgraded code. Now do not need anything extra. alt text alt text alt text

buttondown.jpg (430.2 kB)
buttonup.jpg (211.4 kB)
tickevent.jpg (390.4 kB)
avatar image Rudy Q ♦♦ STAFF Dec 04 '14 at 10:39 PM

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

avatar image fractalzombie Dec 04 '14 at 10:44 PM

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

avatar image Rudy Q ♦♦ STAFF Dec 05 '14 at 02:19 PM

Hello fractalzombie,

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.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question