Announcement

Collapse
No announcement yet.

Mouse Buttons Only Work When Loading Directly Into Level

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

    Mouse Buttons Only Work When Loading Directly Into Level

    Hello all,
    I'm developing a top down shooter using the unreal template. I've gotten rid of the template's "Click to move" controls and replaced it with standard WASD movement and added a laser that follows the cursor. When I load directly into the level my mouse buttons register and call the print string just fine. If I load the game into the main menu and then load the level, however, the mouse buttons are completely broken and will only work once every three or four times and almost never if the character's moving while I click.

    I've made sure the game mode/game instance/pawn class are all correct, tried adjusting the input properties for 'use mouse to touch', tried with and without an action mapping, messed with the player controller mouse settings, put the call in the player character/player controller/level blueprint, but nothing works. Any help would be greatly appreciated. Thanks in advance.

    #2
    I've found where the problem lies, but it doesn't entirely fix what's happening. When the level loads I set the input mode to game only. For some reason this is why the mouse buttons aren't working correctly. If I set the input mode to game and UI the mouse buttons work correctly, however if I hold down the mouse button and try to move the cursor it stays locked in place. It makes for a really clunky feeling when shooting as the cursor "sticks" whenever you shoot.

    So when I load directly into the level I have to initially click in the viewport to gain control of the character. Is there a specific input mode for this that I can access via blueprints? I'd rather not have to click in the viewport to start, but at least it will work.

    Comment

    Working...
    X