Forum rules - please read before posting.

Camera spinning out of control when following cursor

I'm trying to setup a new project in Unity 6. The game is a first-person point and click where you click on things and interactions happen and I want the camera to move very slightly by following the cursor. Unfortunately, for some reason the camera will start quickly spinning in random directions the second the game starts as long as follow cursor is enabled. I've used all the constrain and lock tools that I'm used to using in previous projects but it doesn't matter what is and isn't locked or constrained, it will spin out regardless as long as Follow Cursor is enabled. What is happening? Has the way the camera works changed?

Comments

  • You mention first-person - are you specifically using the first-person camera / movement mode, or is it just a Standard 3D camera?

    There hasn't been any recent change to a camera's "Follow cursor" option, though there are now two input handling options. Are you using Input Manager, or Input System, and - if the latter - AC's integration for it?

    Does this issue occur if you in the 3D Demo scene by enabling the same option on NavCam1?

  • edited April 14

    Sorry, I put a pin in this issue for a while and am coming back to it.

    So last it worked, I was still having this issue with the camera. However, now I have a new problem. Nothing I do to the camera will get it to move at all. I suspect it's because of a random new error on the Game Engine object on play. It gives this error.

    NullReferenceException: Object reference not set to an instance of an object
    AC.MenuLabel.AutoSize () (at Assets/AdventureCreator/Scripts/Menu/Menu classes/MenuLabel.cs:925)
    AC.MenuElement.RecalculateSize (AC.MenuSource source) (at Assets/AdventureCreator/Scripts/Menu/Menu classes/MenuElement.cs:1232)
    AC.Menu.ResetVisibleElements () (at Assets/AdventureCreator/Scripts/Menu/Menu classes/Menu.cs:1592)
    AC.Menu.Recalculate () (at Assets/AdventureCreator/Scripts/Menu/Menu classes/Menu.cs:1638)
    AC.PlayerMenus.RebuildMenus (AC.MenuManager menuManager) (at Assets/AdventureCreator/Scripts/Controls/PlayerMenus.cs:191)
    AC.PlayerMenus.OnInitPersistentEngine () (at Assets/AdventureCreator/Scripts/Controls/PlayerMenus.cs:93)
    AC.StateHandler.Initialise (System.Boolean rebuildMenus) (at Assets/AdventureCreator/Scripts/Game engine/StateHandler.cs:148)
    AC.KickStarter.SetPersistentEngine () (at Assets/AdventureCreator/Scripts/Game engine/KickStarter.cs:180)
    AC.KickStarter.Initialise () (at Assets/AdventureCreator/Scripts/Game engine/KickStarter.cs:1130)
    AC.MultiSceneChecker.RegisterAsMain () (at Assets/AdventureCreator/Scripts/Game engine/MultiSceneChecker.cs:89)
    AC.MultiSceneChecker.Awake () (at Assets/AdventureCreator/Scripts/Game engine/MultiSceneChecker.cs:43)

    Any idea what it's yelling about?

    Additionally to your point, how do I tell what the Input Manager/Input System is and how do I change it?

  • Any idea what it's yelling about?

    What is your AC version? It may be to do with it not finding AC's Main Camera component. Is one attached to your MainCamera object? This will need to be separate from your First Person camera, and exist as a separate object to your Player.

    how do I tell what the Input Manager/Input System is and how do I change it?

    Check the Active Input Handling field in Unity's Project -> Player settings.

  • I'm using Version 1.86.1.

    Where do I put the AC Main Camera Component. I disabled the main camera scene's original Main camera so it wouldn't get crossed with the Game Cameras I was using. I re-enabled it, which has the Main Camera AC on it. Good news is that the error's gone and the cursor reappeared. Bad News is that we're back to the original problem of the camera won't move no matter what I do to the settings. It's been a long time since I've used AC so I may be missing something here.

    I checked Active Input Handling and it's set to Both. It only has the Options of Both, Input Manager (Old), Input System Package (New). Thoughts?

  • The MainCamera is the one that performs rendering - GameCameras are merely references for it. At runtime, your GameCamera Camera components shoud all be disabled automatically, with only the MainCamera's one being active.

    The MainCamera will "follow" whichever GameCamera is currently active, which you can do by either:

    • Setting it as the default Camera in the Scene Manager
    • Using the "Camera: Switch" Action
    • If your game is in First-person, it will switch to the First-person camera automatically when gameplay begins

    What kind of camera / perspective does your game use?

    I checked Active Input Handling and it's set to Both. It only has the Options of Both, Input Manager (Old), Input System Package (New). Thoughts?

    Did you opt to install AC's Input System integration template when running the New Game Wizard? If so, try setting this value to New. It'll require a restart but that'll ensure input only comes from one source. Though, I suspect the wider issue may be due to the camera setup. If you can share screenshots I can try to spot what's wrong.

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.