Announcement

Collapse
No announcement yet.

Understanding world settings, mouse and player controller

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

    Understanding world settings, mouse and player controller

    I made a small test-game to learn Blueprints. It has a custom game mode, player control class, game state and player state. Currently there's only one level, but I may add more later (to learn how to switch levels).

    The game uses the current mouse location to position the player's pawn. My custom player controller has "Show Mouse Cursor" unticked (since the pawn acts as the mouse pointer).

    With all that working, I decided to move on to adding a very basic "main menu": Just some buttons (Play, Options and Quit). I created a new Game Mode, level and a new Player Controller class for the main menu.

    I want a standard mouse cursor in the main menu, so its player controller has "Show Mouse Cursor" ticked. I get the following behavior:

    If I start the game level directly it starts out as I expect, no mouse cursor.

    When I start the main menu I don't get a mouse cursor, but there's a "Shift+F1" text in the top left corner. Indeed, pressing Shift+F1 that gets me a mouse cursor. If I press the Play button (calls OpenLevel), it starts the main game level but with the mouse cursor still visible -- until I click the mouse button (it says "Click for Mouse Control", so that makes sense I guess).

    I'm a little confused as to why the "Show Mouse Cursor" unticked seems to work for the player controller used in the game level (but only when starting from it), but having it ticked in the player controller for the main menu doesn't seem to work.

    Any idea what I'm doing wrong?

    UE 4.12.5 on Mac OS X El Capitan

    #2
    Are you using the correct PlayerController for the MainMenu level in the GameMode override settings?

    The "Shift+F1" and "Click for mouse control" are both options for the Editor, these are not part of your Game.
    Im an Moderator on UnrealSlackers Discord! Which is a Community driven group of likeminded people here to discuss UE4! Join UnrealSlackers on Discord!

    Comment

    Working...
    X