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"

How could I stop my mouse from touching the walls?

I have the following screenshot which shows the node setup (this is the top down template so I did not set these nodes up myself).

I want the mouse to be blocked from moving to the very edge of the walls... so basically keep it within the boundariesalt text of the room I have created... and one last thing, it is setup so that I need to hold right click to move around, is there a way I can click to start and then the right click does not need to be held down to move? The mouse is also green which I don't understand how as this blueprint setup looks short and simple.

Any advice will be appreciated and I am new to ue4.

Thanks :)

Product Version: UE 4.13
Tags:
mouse curser.png (363.0 kB)
more ▼

asked Oct 17 '16 at 10:15 PM in Blueprint Scripting

avatar image

Tommow
15 13 17 19

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

1 answer: sort voted first

I don't know how you could block the mouse from moving over certain Objects, if the walls are not in a Square around it, but you can set it up, so that it ignores that input. Just create a new trace channel in the Project settings and set the "get hit result under cursor by channel" to the new channel. Then go to the walls blueprint and set the new channel to "ignore". Also for the movement via holding you should post a screenshot, so i can see what could be the problem.

Hope this helps :)

Lexyth

more ▼

answered Oct 17 '16 at 10:52 PM

avatar image

Lexyth
133 6 10 18

avatar image Tommow Oct 17 '16 at 11:14 PM

That's screenshot you see is all the example has for the top down template.

avatar image Tommow Oct 18 '16 at 12:13 AM

Ahh I have found this BP which is the controller... I cant make much sense of it myself but if you can see a way I can remove the holding down input and simply have it so it follows the mouse cursor with no buttons held... thanks.alt text

avatar image Lexyth Oct 18 '16 at 02:38 AM

The "InputAction Set Destination" nodes released Execution is causing it to stop getting the location when the Button is released, so you'd have to remove the connection. But you'd need to close the gate again, otherwise it would cause some problems. You could do this by connecting the "Move to Hit Location" back to the Close pin, if its Execution fires only as it has reached its target location. It should be this way, but it may already fire while its still walking. If you double click it you can open it and see if theres something that says that it executes only after the character reaches the destination.

avatar image Lexyth Oct 19 '16 at 03:42 AM

So I've just tried it for my self and it actually should work just by clicking like it is and by holding... But if you want it to just move via click, you can just detach the gate node and connect the pressed pin to where the gate was connected. Thats the easy way :D Above I made a mistake, but it explains pretty much how it works, so I'll leave it there.

(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