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"

custom mouse not set to mouse position blueprint

I want to set the position of my custom cursor(a widget in the umg) to the mouse cursor and what I've got is pretty strange...there is an offset between my cursor and the mouse cursor..and with moving it the offset is going to change.. I am using event tick for the umg blueprint.alt text what can I do to resolve this probelm? thanks in advance

Product Version: UE 4.8
Tags:
blueprint1.png (184.3 kB)
more ▼

asked Aug 27 '15 at 09:15 AM in Blueprint Scripting

avatar image

sina13
1 3 6 9

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

4 answers: sort voted first

In most cases, the mouse position is based off of Screenspace not viewport/widget space. So if you have your viewport not anchored to your top left corner of your monitor, you will get offsets. I believe you even have offsets unless you go borderless.

You need to add the viewport/widget offset to your calculations. You can use the node "GetScreenSpacePosition"

Hope that helps =)

more ▼

answered Aug 27 '15 at 11:37 AM

avatar image

Devero
2.3k 114 61 230

avatar image sina13 Sep 07 '15 at 08:05 AM

sorry i've been working on another project...now I came back to this project..how to use GetScreenSpacePosition? and where?

thanks

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

thanks i'll give it a try

more ▼

answered Aug 29 '15 at 04:37 AM

avatar image

sina13
1 3 6 9

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

now it works thanks alt text

more ▼

answered Sep 07 '15 at 11:17 AM

avatar image

sina13
1 3 6 9

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

I've got another problem and the problem is that i set to not show the default mouse cursor but after showing the new umg and every time i click the button that cursor shows up..how to solve it?

more ▼

answered Sep 07 '15 at 11:19 AM

avatar image

sina13
1 3 6 9

avatar image Nsomnia Sep 07 '15 at 12:54 PM

Just do a verification of a getPlayerCotroller -> SetMouseCursor when the butto is clicked or whatever script is giving you problems.

(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