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"

Check if mouse/cursor was moved

I want to know if there anything to check the mouse movement. Is there a event or something so i can create a camerareset

Product Version: Not Selected
Tags:
more ▼

asked Apr 05 '15 at 07:35 PM in Blueprint Scripting

avatar image

TheMrTorbi
80 11 21 28

(comments are locked)
10|2000 characters needed characters left

10 answers: sort voted first

@Ockertvs How does the "Checkifmousehasemoved" condition look like and how do i create it?

more ▼

answered Apr 10 '15 at 12:37 AM

avatar image

TheMrTorbi
80 11 21 28

avatar image Ockertvs Apr 10 '15 at 01:23 PM

There are a few ways.That CheckIfMouseHasMoved" condition was just a collapsed node of one of these examples.alt text

screenshot.jpg (340.8 kB)
avatar image Ockertvs Apr 10 '15 at 01:25 PM

The 0.5 Values were just tests.Its best to ignore them completely.

Ockert.

(comments are locked)
10|2000 characters needed characters left

you can add an event to mouse x and mouse y under the input manager under:

edit->project settings->input

Add an axis map and apply it to mouse X and another to mouse y.

those events will be called when the mouse moves with a value (so you can add a degree of dead zone)

more ▼

answered Apr 05 '15 at 07:57 PM

avatar image

Justin.Dooley
2.1k 104 68 159

(comments are locked)
10|2000 characters needed characters left

thanks @Justin.Dooley

here is what it looks like: alt text

notmoved.png (110.4 kB)
more ▼

answered Apr 05 '15 at 08:14 PM

avatar image

TheMrTorbi
80 11 21 28

(comments are locked)
10|2000 characters needed characters left

It should work fine. In your check it requires both to be zero for not movement. Make syre you have the correct axis selected in the axis map.

I've provided an example as well that accounts for a deadzone as well as if input is active or not.

Movement

movement.png (96.6 kB)
more ▼

answered Apr 05 '15 at 09:31 PM

avatar image

Justin.Dooley
2.1k 104 68 159

(comments are locked)
10|2000 characters needed characters left

thanks @Justin.Dooley but its not that accurate because if i move my mouse from left to right there is also a 0 value so it would reset any other solution?

more ▼

answered Apr 05 '15 at 09:13 PM

avatar image

TheMrTorbi
80 11 21 28

(comments are locked)
10|2000 characters needed characters left

@Justin.Dooley okay the problem is solved but it resets instantly

i want a delay of 2 seconds and it should check if in between the 2 seconds of delay it moved

more ▼

answered Apr 05 '15 at 10:25 PM

avatar image

TheMrTorbi
80 11 21 28

avatar image Ockertvs Apr 06 '15 at 05:57 PM

This is one way to ensure the delay is always 2 sec since the last mouse movement alt text This clears/reset the timer when mouse is moving , and sets/starts the timer(delay) when mouse is not moving.

Ockert.

(comments are locked)
10|2000 characters needed characters left

I setup a timer event that does this. It calls the check for movement function every 2 seconds. In the check for movement function it does whatever you want and then resets the mouseMoved variable back to false at the end

alt text

alt text

more ▼

answered Apr 06 '15 at 12:10 AM

avatar image

Justin.Dooley
2.1k 104 68 159

avatar image Ockertvs Apr 06 '15 at 06:22 PM

I might be wrong , but the way this timer is setup , will give you an inaccurate and not a constant 2 sec delay since last mouse movement.

Ockert.

Just trying to help. See the alternative setup above.

avatar image Justin.Dooley Apr 06 '15 at 06:43 PM

the timer will check every 2 seconds not 2 seconds from last input.

avatar image Ockertvs Apr 06 '15 at 07:11 PM

As I understood the question , he wanted the camera to reset , if the there was no mouse movement for 2 seconds.If so , the timer should only start counting when mouse movement is = false.

If I misunderstood I apologize for any inconvenience

Ockert.

(comments are locked)
10|2000 characters needed characters left

Ockertvs is right

i hadn't the time for trying out since now

i wanted it to check for movement and if there is movement i want the timer to quit the event for resetting

more ▼

answered Apr 08 '15 at 05:18 PM

avatar image

TheMrTorbi
80 11 21 28

avatar image Ockertvs Apr 08 '15 at 06:44 PM

Then the screenshot I posted above should work as intended. The test worked perfect for me.

Feel free to ask if you need more help.

Ockert.

(comments are locked)
10|2000 characters needed characters left

@Ockertvs okay got it i should use google more before asking ^^ thanks anyways for helping and also thanks to Justin.Dooley :)

more ▼

answered Apr 10 '15 at 12:59 AM

avatar image

TheMrTorbi
80 11 21 28

(comments are locked)
10|2000 characters needed characters left
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