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
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
Insert the line:
cursorIsLocked = false;
into that spot. Does that make a difference (I'm assuming your using Mouse And Keyboard input, here)
And yes, I'm using mouse & keyboard.
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
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.
I placed it back and then build the game, but with the same results.
You've got a PM.
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