Forum rules - please read before posting.

Player movement jitter

Hello there.

I'm currently finishing a game jam and AC has been of huge help. However I've been noticing a strange jitter with character movement, but I can't seem to figure out the reason, or even replicate it consistently. I've made a few different projects, some with proper characters, some with just cubes, and some jitter and some don't. It doesn't seem to be performance related, and it feels like the jitter doesn't appear when looking at the character from the scene window instead of the game window. Though I managed to mostly smooth out the jitter by using the rigidbody interpolation, and playing on a build, but upon making my friends test it, it seems they have issues on the build as well.

Video below. The player inspector is completely default for testing purposes, except for the interpolation.

Other notes:
3D game
Direct movement
Third person camera
Cursor locked in center
The game is meant to have no gravity in order to fly around but in the video's case it's the same with our without gravity. I also have an additional script for moving up and down but it's not applied there. Plus, the jitter also appeared in another project with a normal walking character.

Unity version: 2021.3.11f1 (LTS)
AC version: 1.77.1 (current at this time)

Here's the current game page if you want to test the build as well: https://heathersward.itch.io/for-those-we-love

I'm just kind of confused and not really sure where to begin looking despite my testing. Please let me know if you want other info.

Comments

  • The video's a bit hard to make out - could you share screenshots of your Player's full Inspector?

    Try replacing the Player's Rididbody and Collder components with a single Character Controller.

  • Here you go.

    High framerate

    Low framerate

    (Player inspector)
    https://imgur.com/a/3H5NTnl

    Other observations I made:
    The jitter does seem to be slightly different depending on the framerate. It's always there but more apparent on lower fps.
    It doesn't seem to be general lag since the camera itself does not seem jitter this way.
    Replacing the rigidbody and collider with a Character Controller changed nothing about the jitter.
    The player's speed is 5 (walk) and 10 (run), and the parameter in the animator shows these perfectly without fluctuations.

  • Is there noticable jitter if you rely on a fixed camera that's looking down over the scene?

    If not, try opening up AC's GameCameraThirdPerson script, and replace the line:

    private void LateUpdate ()
    

    with:

    private void Update ()
    

    Does that improve the behaviour?

  • Yep there was no jitter with a fixed camera.

    Replacing the line in the script worked! Thank you. I'm not a programmer so I have no idea what this changes and why but I appreciate the help.

  • No problem - thanks for the report and feedback.

    This change may be best handled as an option in a future release - I shall consider adding a "work in Update vs LateUpdate" option to the GameCamera Third Person Inspector, similar to what Cinemachine provides.

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.