Forum rules - please read before posting.

Cursor not movable during conversations AC + UFPS 1.48 issue (solved)

edited October 2014 in Technical Q&A
Hello again,

Every time I start a conversation, the cursor gets fixated. In order to choose one of the on-screen dialogue options, I need to press ESC to enter the menu and then exit it again to get the free moving cursor.

I tried to recreate this issue, but I can't really figure out what's
causing it. I haven't been using conversations in my scene for a while
and now that I want to implement them again, I'm having this issue. I'm using AC 1.38b (I also tried to upgrade to 1.39c but this dindn't help) along with UFPS 1.47c.
When I started my project, I was able to use the conversations like I was used to, but I've changed a few lines of code (for this and this) and did some upgrades for both AC and UFPS in the meantime, so maybe it happened there somewhere.

If there's anything I can do to manually make the mouse free-moving again as soon as a conversation is started, I would go for that. But right now, I've got no idea in which script/setting I can do so.

Comments

  • Fixed where, exactly?  If it's in the centre of the screen, it means it's locked.  Pressing the "ToggleCursor" input should unlock it this case - though it's possible this should be automatic.
  • It's not completely centered once it gets fixated.

    I assigned the ToggleCursor input, which works during gameplay at first. However, during conversations it's not working. The only way to get the cursor moving freely again during conversations is by hitting the escape (Menu) key twice. If I then click somewhere in the screen (not on one of the dialogue options) the cursor gets fixated again.

    Now for the weirdest part: once the conversation is over and I return to gameplay, the ToggleCursor input isn't working anymore. When I press it then, the cursor will get fixated on the exact same place as it was during the conversation. Even if I stop the game and play it again, the "unlocked cursor" is not movable. The only way to get it working again is by restarting Unity (opening the same scene again isn't enough). It seems conversations somehow sudenly ruin the free movement of unlocked cursors :S
  • Since I can't reproduce this, you're going to have to bear with me a little bit.  Open up PlayerInput.cs, and find line 186 (just after the "else if").

    Insert the line:

    cursorIsLocked = false;

    into that spot.  Does that make a difference (I'm assuming your using Mouse And Keyboard input, here)
  • No difference, except the game now starts with an unlocked cursor.

    And yes, I'm using mouse & keyboard.
  • I tried building my game. There the problem is even worse: after encountering a conversation the cursor even freezes in the pause menu of the build. So starting a conversation is now completely breaking the game.

    The weird thing is, if I encounter a conversation in the editor and then make a build, the cursor is frozen where it should be a free-moving cursor, even from the start of the build on :(
  • Is that once you've removed the line insertion I suggested?

    I may have to see this for myself.  Is it possible for you to create a UnityPackage of just the bare essentials needed to demonstrate this?  If you can strip everything out (including unnecessary menus, scenes, graphics), or better yet make a test scene, then PM it to me and I'll look into it.
  • edited October 2014
    Yes, I removed it again before building.
    I placed it back and then build the game, but with the same results.

    You've got a PM.
  • Solved! In the end this had to do with two things:

    1 - UFPS got upgraded to 1.4.8, which wasn't AC compatible anymore.
    2 - I had some settings on my player controller set up wrong, so I couldn't move the cursor during conversations even after fixing the first issue.

    The first issue will be resolved in AC 1.40, but Chris already provided me with a new script to make UFPS 1.4.8 work properly with the current release of AC. It can be found here:
    http://www.adventurecreator.org/files/UltimateFPSIntegration.cs
    Simply place it in AdventureCreator/Scripts/Static. You'll
    then need to add a "Freeze" state to your vp_FPInput camera using the
    FreezeInput text file.

    The second issue was fixed by changing settings in the VP_FPInput
    component. Under Mouse Cursor I had "block mouse look" checked and
    "force cursor" unchecked. It should be the other way around, that was
    why I wasn't able to move the cursor, even after applying your new
    script. I still have no idea how those checkboxes were altered. I
    literally spend days overseeing them. Oh well, glad I figured it out in
    the end. And glad AC now supports the latest version of UFPS :)
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.