Page 1 of 1

UCC Integration Question

Posted: Sun Jan 13, 2019 10:43 pm
by MrQuaid
I use the third person view and have a slight issue. If I follow your tutorial and have Converse unequip my melee weapons the mouse does not become visible. But if I leave the weapon in hand it works fine. Not a big deal, but wondering if maybe its due to a timing thing. As my player is unequiping his weapon the dialogue tree is coming up and the mouse gets turning on then off. Is there a way to delay the dialogue until the player has fully unequiped weapon.

Re: UCC Integration Question

Posted: Mon Jan 14, 2019 9:50 am
by Tony Li
Hi,

Here are some things to check/try:
  • Converse ability: Disable Gameplay Input is ticked.
  • Dialogue Manager > Input Device Manager: Detect Mouse Control & Control Cursor State ticked.
  • Dialogue System Trigger: Show Cursor During Conversation ticked.
  • Call UnityInput.DisableCursor = false
The last two are nuclear options. In most circumstances they aren't necessary, but depending on what else is going on in your project they should be fairly sure-fire ways to ensure that the mouse cursor is visible. For UnityInput.DisableCursor, you can add a script like this to the player:

Code: Select all

public class EnableCursorInConversations : UnityEngine.MonoBehaviour {
    void OnConversationStart(Transform actor) {
        GetComponent<Opsive.UltimateCharacterController.Input.UnityInput>().DisableCursor = false;
    }
    
    void OnConversationEnd(Transform actor) {
        GetComponent<Opsive.UltimateCharacterController.Input.UnityInput>().DisableCursor = true;
    }
}

Re: UCC Integration Question

Posted: Sat Jan 19, 2019 6:52 pm
by MrQuaid
Thanks, I had to use the latter to fix the mouse issue. The other methods i had already tried or didn't work. I have the functionally I want so i'm good to go. Thanks.

Re: UCC Integration Question

Posted: Sat Jan 19, 2019 11:26 pm
by Tony Li
It's possible another passive ability or something else was setting the cursor back. I'm glad that it sounds like you got it working.