Forum rules - please read before posting.

Camera Glitch in First Person

Hello!
I bought AC back in 2014. Played with it a bit and then left it alone. I have recently began developing a FPS survival horror that I decided to use AC for. Everything so far works great. I have only one hang up. The camera lags and glitches whenever the player moves and tries to look around. Standing still everything is smooth. Now to clarify I am using Unity Character Controller, not rigid body. I did at first use a capsule collider and rigid body but swapped to Character Controller in hopes it would solve the problem but it does not. i have all my settings to the lowest they can go and I've went through every forum looking for an answer. The only thing that does get rid of the glitches is using the Drifter FPS listed on another forum here. The only problem I have with that is I can't get the camera to quit looking around when the cursor is locked. Can anyone help me out on this last issue. I've tried everything but I can't get the camera to hold position while the cursor is unlocked. Thanks in advance for any help.

Comments

  • Welcome to the community, @DedHed. What are your versions of AC and Unity?

    Can you elaborate on the "lag and glitches" that you're experiencing? If you haven't already, have a look through the "Player prefab: First-person" template file over on the Downloads page. The prefab and instructions included should be enough to get you up-and-running with smooth motion in first-person.

    If you do want to rely on a separate asset for movement, you'll need to also attach a custom script that tells that script when to stop running its various features (such as free-aiming) when AC wants it to.

    As well as disabling free-aiming when the AC cursor is locked, you may also want to prevent movement during an AC cutscene. To do either of those things, you can make use - and adapt - this code snippet, which, when placed inside a C# script, will let you look out for these two scenarios:

    void Update ()
    {
        if (AC.KickStarter.playerInput.IsCursorLocked ())
        {
            // Allow free-aiming in the custom controller
        }
        else
        {
            // Prevent free-aiming in the custom controller
        }
    
        if (AC.KickStarter.stateHandler.IsInCutscene ())
        {
            // Disable motion on the custom controller
        }
        else
        {
            // Enable motion on the custom controller
        }
    }
    
  • Solved. Just a piece of junk computer. I was pushing the hardware to much. Thanks for the feed back :)

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.