Forum rules - please read before posting.

RigidBody jitter on player when running in circles

Unity 6.5 (6000.5.2f1)
AC v1.86.4

I am making an action fps game and switching out the Character Controller for a Rigidbody with collider on the SamplePlayerFP gameobject has the effect of making running in circles jitter the movement or camera - not smooth. I have played around with settings on the game object for a couple of evenings without success of solving the jitter.

As AC is generally made for slower paced games, is the rigidbody jitter a known accepted side effect and best that I write or obtain a new player object script more suited to fast paced action, or is there a fix for the AC version?

many thanks.

Comments

  • edited July 17

    Generally the Character Controller does fare better for the style of game AC is intended for. For action games, I would say it's worth looking into a more dedicated asset as a motion controller for a fast-paced action game is a large and complex topic in and of itself.

    However, for the original issue: open up AC's Char script and look for the first SetRotation function around line 1762. Above:

    TransformRotation = _rotation;
    

    add:

    if (_rigidbody && useRigidbodyForMovement) _rigidbody.MoveRotation(_rotation);
    

    Does that reduce the jittering?

  • Fantastic Chris! That has completely fixed the issue. Smooth as butter now.

  • edited July 18

    On a related note, what is the difference between the functions of
    "Turn Speed"
    "Head turn speed"
    "freelook sensitivity"

    "movement smoothing" and "Destination Accuracy"
    "Free-aim Acceleration" and "Max Free-aim Speed"

    as well as how they effect each other, in laymans terms?

    • Turn Speed: The character's body-turning speed when under AC's control (for a Player, this is during cutscenes)
    • Head turn speed: The speed of the head when turning due to IK (not the same as free-aiming)
    • Freelook sensitivity: The speed multiplied for free-aiming

    For First-person camera speed, it's the last one that you'll want to tweak

    • Movement smoothing: Applies a Lerp to the movement input, to give it a smoother acceleration
    • Destination accuracy: How close to a character's destination is "close enough" for it to be considered arrived

    These two are independent and don't affect each other

    • Free-aim Acceleration: The scale of the Lerp to apply to the free-aim Input. Higher values mean more responsiveness when free-aiming
    • Max Free-aim Speed: A maximum cap applied the magnitude of the free-aim input. Lower values mean the max turn speed is lowered
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.