UMG "Inventory"

Hi. You have to get a PlayerController object (from your pawn or from somewhere else) and use it’s related nodes:

230079-inputcc.png

It will allow to adjust an input what you want. To allow only UI input you can use SetInputModeUIOnly. To return the game you have to use SetInputModeGameOnly. Also you have to set ShowMouseCursor property on controller to see a cursor. The best practice is to do all this things inside customized player controller and export only some functions from it to show\hide an inventory. Also you can handle input inside a controller - it allows to create a global functionality that doesn’t depend on currently posessed pawn (if you don’t switch characters it doesn’t mater)

Hi,

So I want to make slelectable inventory in middle of my screen in game. So it will look like that:

I just set up mouse position to middle of screen (it is not in middle :(). The blueprint looks like this

How can I set it up to be like the game pause and it will show mouse cursor where I will choose button e.g “HANDS” and it will hoover?

the character blueprint looks like that:

Hmm… Sounds strange. Maybe your game lost capture and mouse is just blocked by the window edge? If it was you will still can turn around with keyboard arrows.

So I did in different way. Will show blueprint.

But now problem is with character rotation when I play game player just rotate with 90 degrese can’t do 360 degrese. What is the problem ?

You can change collision preset of your Hammer mesh to BlockNothing, maybe it will help if problem is with collision

Nope, still same problem. I think there is some problem with mesh in character. Maybe this will help?

There is nothing like BlockNothing, I just tried all of them and still is the same problem :frowning:

I think if found problem. There is some problem with widget… mean when I change visibility of hammer it working normal but is visible in game when Default button to open this widget in game is mouse right button so I have to press it once to choose something and duble to close so when I dubble click and widget is not visible I can only rotate with 90 degrese… What is the problem?

It might be related to enabling mouse cursor - please try not to enable a cursor and check this bug again. If it will remain it would be better to use SetInputMode nodes instead.

But then how I will press the button if then I will want to mesh be visible?

Well I disable the mouse cursor and I press right botton to show widget so there I cant press button but when I duble click right mouse button it is come back normal and I can rotate around character. Is it the problem with engine or blueprint?

It seems that input modes are important
https://docs.unrealengine.com/latest/INT/Engine/UMG/QuickStart/5/index.html

I’ve just see that and I did that in functions. It is working. but when I press again right botton I can still see mouse but if I press left button the mouse is not visible and I can control player. This is blueprint:

But there is no nodes I said about

230167-rbn.png

230168-brb.png

these nodes changes an input mode to allow you use GUI (UIOnly) and then to play a game (UIGameOnly)

Ok, I did in different way. But thanks a lot of your time and help!