Forum rules - please read before posting.

Can't hide cursor in a background cutscene

edited October 2021 in Technical Q&A

Hi. I created cutscene, where player falling down to the planet in an escape pod. Player can only turn a head a little while cutscene working (by Cursor Influence in a GameCamera), but to make it possible i had to do mark this cutscene as background. It works fine but I see a mouse cursor (in a build also). Problem happens ONLY in background cutscenes.

I tried to disable cursor everywhere in AC settings but it's still appears. Interestingly, there was no such problem yesterday. But today I wasted a few hours and still can't fix it...

I tried to disable cursor in cutscene by node Engine->ManageSystems - Cursor Disabled, game still ignoring that.

Have no idea what to do else. Hope you can help. Thanks!

Comments

  • If you're using Hardware cursor rendering, it involves your system's cursor. Disabling AC cursor system in the Action won't hide it - it'll just stop AC from controlling it.

    Is your "Display cursor: Never" setting your regular cursor setting, or an attempt to hide the cursor?

    When using the system cursor, the best way to hide it is to assign an empty/invisible texture through script. To control the main cursor, if it's set to display:

    AC.KickStarter.cursorManager.pointerIcon.ReplaceTexture (myNewTexture);
    

    Though, you bring up a good case to add an option to allow cameras to have a cursor influence during cutscenes. I can look into this as part of the next update.

  • edited October 2021

    Hi, Chris!

    Mostly I not need a cursor, it's FPS game. But I need it in inventory / main menu / pause. But now it's appears in background cutscenes.

    "Disabling AC cursor system in the Action won't hide it" - hmm... So ho can I control showing/hiding of cursor in cutscenes? I'm not a programmer, so I need to do that without coding :smile:

  • Your situation isn't a cutscene, despite the name of the component. If it's running in the background, it's treated as regular gameplay.

    I think the easiest way forward is to simply allow for cursor influence over the camera during cutscenes - that way you can keep the cutscene as a regular "Blocks Gameplay" ActionList.

    To do this, open up AC's CursorInfluenceCamera.cs script, and change line 41:

    if (KickStarter.stateHandler.IsInGameplay () && KickStarter.playerInput)
    

    to:

    if (KickStarter.playerInput)
    

    In the next AC update, I can add a per-camera option to control this setting.

  • I'll try, thank you!

  • edited October 2021

    Hmmm... That helped but for me it really would be the simplest solution to have just an Action to hide / show the cursor. Thanks anyway!

  • Paste this script into a C# file named CursorVisibility.cs:

    using UnityEngine;
    
    public class CursorVisibility : MonoBehaviour
    {
    
        public void HideCursor ()
        {
            Cursor.visible = false;
        }
    
    }
    

    Attach to a GameObject and make it a prefab.

    You should then be able to use the Object: Call event Action to run this prefab's HideCursor function to make the cursor invisible, provided you've disabled AC's Cursor system using the Engine: Manage systems Action.

  • I'll try, thanks!

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.