Forum rules - please read before posting.

Feature Request: Lock cursor in game window option

Could we have a tickbox in the GameEditor Settings which forces the cursor to stay within the confines of the game window?

Comments

  • This isn't possible if you're using Hardware cursor rendering, but is if you use Software. Check Always keep cursor within screen boundary? in the Cursor Manager.

  • What is the difference using software rendering for cursors? My game is 2d btw.

  • hang on. This is already on Software and that is already checked. Basically my windows cursor still moves about on my other monitors.

  • Ah, I thought you were referring to the AC cursor.

    Yes, this should be an option - or the above should affect the system cursor. Either way, I'll look into it.

    In the meantime, you should be able to enable this by opening UnityVersionHandler.cs, and replacing the two instances of:

    CursorLockMode.Locked
    

    with:

    CursorLockMode.Confined
    
  • That fix didn't work. Same behaviour.

  • Apologies, I meant you should replace the instances of CursorModeLock.None. CursorModeLock.Locked should remain as-is.

  • I changed CursorLockMode.Locked to CursorLockMode.Confined and have left it in the build. The game seemed to play as normal. Can you see any issue leaving it in there incase I do not change it?

  • It won't lock the cursor when it should.

    Cursor locking is typically used in first person games, and involves the cursor being locked in the centre of the screen. It's either done through Actions, or by invoking the ToggleCursor input.

    I'd recommend changing it back, but if you don't use these you're probably OK.

  • The only time I've done anything that sounds like cursor locking is using engine: manage systems and disabling input and cursors. Does that count? My game is releasing in about 3 days and I don't want to fiddle with anything if I can help it.

  • Actually. I just put the new change in, works great. Did a full playthrough and everything is fine. Thanks again!

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.