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"

Little issue with Mouse X and Mouse Y

Hi ! I have a little issue with the Mouse X and Mouse Y node, I made this simple script to drag my camera in the game. alt text

The issue is that i need to hold pressed the mouse button to drag the camera, I just want to drag the mouse without any button pressed, there is a way to do that ?

PS: Sorry for my english and thank you.

Product Version: UE 4.20
Tags:
camera-issue.jpg (403.3 kB)
more ▼

asked Sep 16 '18 at 12:43 PM in Blueprint Scripting

avatar image

Cervelx
63 6 10 15

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

1 answer: sort voted first

Judging by the script you do not need to hold the button. This should work as is. You also do not need to cast in this case. It will work without it.

You may have a problem with capturing the initial click, though. Can you try clicking in the viewport once after running the game. Once you've clicked you should still be able to move the camera without holding the button.

Is this the case?

more ▼

answered Sep 16 '18 at 12:56 PM

avatar image

Everynone
13.8k 74 25 58

avatar image Cervelx Sep 16 '18 at 01:16 PM

It is not the first click, i'm casting because i'm in another graph

avatar image Everynone Sep 16 '18 at 01:22 PM

i'm casting because i'm in another graph

That's not how casting works and you do not need the cast here, trust me. Saves you a bit of performance. But that's not the issue.

Although, one thing that could make it stop working is the actual cast, if it fails, the input does not get processed. Consider some ghetto debugging, put a Print String node after the cast fail and see if it ever triggers.


I replicated this in a blank, clean project and I do not need to hold the button to make it work. The issue is elsewhere then.

Anything else that you want to share?

  • you're switching controllers?

  • you have an UI that might consume input?

  • widgets pass Handled / Unhandled?

  • anything else is using the same InputAxis in another blueprint?

avatar image Cervelx Sep 16 '18 at 01:25 PM

i try in a new project and it work :(

avatar image Cervelx Sep 16 '18 at 01:27 PM

Thanks for the advice on the cast, i have fixed in this way, i uncheck the "show mouse cursor" on the controller class :)

avatar image Everynone Sep 16 '18 at 01:29 PM

Oh, that was quick! Well done!

i uncheck the "show mouse cursor" on the controller class :)

So this stopped working because the cursor wasn't showing? Interesting, actually.

avatar image Cervelx Sep 16 '18 at 03:09 PM

Yes, i did not expect this :)

(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