Can't get mouse input to work correctly

I’m using the Multiplayer Inventory - Drag & Drop project with the Topdown UE starter project. I’ve got everything setup how I want. I’ve disabled and removed a few other UI elements I didn’t want and altered some of the scripts, but not to an extent that it’s to different, I’m still new to this.

Everything works, almost. If I start the game and start moving around its fine. I can click to pick up object and continue to move around, but once I open the inventory and close it, I have to double click before the mouse input is registered. The inventory project was made for a third person survival, I’ve since removed the line trace from the player camera and replaced it with “get hit result under cursor by channel” so that items on the ground can be registered.

I doubt showing the full project or any major part of the project would be acceptable since its on the store, I’ll show a snippet of what I think might be the issue and hopefully that will be enough. I’ll do my best to follow instruction if anyone is willing to help.

I’m not sure if the “set input mode game only” is causing the issue, or maybe the inventory is not being hidden completely, but I think the problem is in that section, I don’t know if that’s the case though.

Thank you very much for any help.

The bit of code you put up looks fine. It’s really hard to say without seeing more. The best thing you can do is just put print statements in the code to track where you think the execution is, or should be going.

1 Like

Edit: I redid the project without modifying it and it works just fine, so I did something that caused the issue, I can’t say what it was as all I did was very minimal. Well, clearly I got a lot more way to go before I understand blueprints and UE…

Ya, it’s a strange issue (to someone inexperienced like me anyway). It’s only when the UI closes does the character refuse to move to the location when I left click, I have to double click for the movement to start and even then moving the mouse around does nothing, the character continues to move in one direction regardless of where the mouse is when held down.

1 Like

My blind bullet :sunglasses:
move the set inputs to the end or in the hud, and make sure that it is the only place where you make these calls

1 Like

Thanks for the help DomusLudus, but that didn’t work for me.

I’ve since figured out that, if I hold my right mouse button down my left works just fine. If I open the inventory then close it my left button works for the first click then stops for every consecutive click and if I do it again it’s the same, open inventory left click works once then stops, but if I hold down the right button then the left, everything works. I should also mention that, while the inventory is open the left mouse button works.

I’ll just work on a new project, follow the steps I took in this one and hopefully catch or figure out what is causing this issue. At least I’ll lean for next time.

Edit1
I’ve figured out the issue. In the picture I posted, the first “show mouse cursor” connected to set input mode game only was causing the issue… One problem down, time to figure out how to show the mouse now…

Enabling show mouse cursor elsewhere also causes the issue…

Edit2
Removing or just not connecting anything to the input modes seems to have solved the issue of the mouse not working when leaving the inventory.

I don’t know what issues this will cause, but things seem to work fine…