Forum rules - please read before posting.

Full Disable Mouse - Keyboard Controls

Hey everyone,

I'm wondering if anyone has found a way to completely disable mouse input in an A/C game. I've got the cursor locked in the center via the settings, I've used Manage Systems to do Cursor: Disable, but what is still happening is this:

If the mouse cursor position on the screen happens to be on top of one of my (UGUI) menu buttons, that button will acknowledge it as being mouseOver, even though it's supposed to be disabled...!

So is there a way around this? Is there a way to get a game to just acknowledge the keyboard and gamepad alone, and totally disable the presence of the mouse?

Let me know if any of you keyboard/gamepad direct-control types have figured anything out...!

Comments

  • Unity's default EventSystem doesn't allow for keyboard/controller-only control - you need to assign a custom EventSystem that ignores mouse input completely.

    AC will attempt this for you if you check Disable mouse when keyboard-controlling Unity UI Menus? in the Menu Manager - though this only appears if your Input method is Keyboard Or Controller and v1.55 or later.

    Otherwise, you'd have to supply a new EventSystem prefab into the Menu Manager, which AC will use instead.
  • Interesting! All of that actually applies to how I already had things setup (though I'm only on 1.55c - too close to rock the boat now unless I absolutely have to) and while this does indeed block any mouse hover activity after the UI elements have spawned, it will highlight them if the cursor is already there when they do.

    If that's something you can do something about, it may be something to look into - people have big buttons and people carelessly leave their invisible mouse cursors all over the place. :)

    However, with a little additional research on the Unity side, I've come up with a solution - though it may only work for folks working with UGUI.

    It's crazy simple - you guy to your UI prefab root 'Canvas' object and completely disable the "Graphic Raycaster" component in it.

    No raycast, no mouseover detection. :)

    And combined with whatever AC is doing in its automatically-generated Event System to preserve keyboard controls, everything works hunky-dory. 

    Will update this thread if anything with it breaks, tho...
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.