Announcement

Collapse
No announcement yet.

Problems with launching the menu

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Problems with launching the menu

    Hi everyone. I was trying to make a menu (just learning about Blueprints), and got a problem with it.
    Okay, 1st of all, there's my BP:
     
    Spoiler

    Yeah, i know, that it's maybe the easiest BP, that I could done, but i cannot understand, how to fix one bug.
    So, the essence of the bug. When I click a Alt-button, menu appears, but when i'm trying to click any menu-button, my camera continues to move, and to click any button in Menu, i have to click RMB firstly... i want to remove that, to make that: Clicking Alt-button - camera and WASD-system (which is written in BP below) are locked - cursor is on the screen - i can press any menu-button.
     
    Spoiler

    I will be very grateful, who will help me and send him a gingerbread

    #2
    This is how I would do it. Create a boolean that is set true or false when the widget is being created or destroyed. After creating and adding to viewport, you want to set the input mode game and ui. This should solve your RMB click in order to interact with the UI. Now we ignore look and move input so that we can't move the camera or move the character with WASD. When destroying(hiding/removing) the widget, set the boolean false and enable move and look input. Set input mode game only so that you wont have to click back into the game to start controls. The problem we run into is that you can still click anything that isnt covered by the widget. There are a couple solutions but I think the boolean is the easiest.

    Click image for larger version

Name:	UImode.PNG
Views:	1
Size:	255.1 KB
ID:	1131005

    Set a branch from you click input actions or events to only run if the menu is false(hidden/destroyed/etc.).

    Click image for larger version

Name:	UImode_mouseClick.PNG
Views:	1
Size:	83.4 KB
ID:	1131006

    Comment

    Working...
    X