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 boundaries

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 :slight_smile:

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 :slight_smile:

Lexyth

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

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.

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.

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 :smiley: Above I made a mistake, but it explains pretty much how it works, so I’ll leave it there.