Character Controller Collider causing Camera jitter

Hello again. I’m off of the scripting issues (for now) and onto the collision features of Unity.

** CTRL + F “TAQ” for The Actual Question-- this is just me trying to be thorough :slight_smile:

I have a script for a 3rd person camera that uses the Character Controller collider.

What I initially did: Attached the Character Controller to a basic capsule, added a rigidbody, and had no jitter at all.

What I just did: Transferred all scripts and necessary game objects over to my imported model and placed my model inside the character controller collider.

One of two things keeps happening:

The first issue I ran into (but fixed) was that my character kept being placed outside of the collider when I pressed play. I realized how to fix that… seems that it was fixed if I added the rigidbody before adding the collider.

TAQ:

The issue that I can’t seem to fix, however, is the camera jitter associated with the collider. I get no jitter if I put the character outside of the collider, but then that’s far from optimal.

I also don’t get jitter if I don’t use a rigidbody, but that’s sadly not an option either.

Has anyone experienced a similar issue?

The only reason you need a rigidbody is because you cannot attach a collider to your model?

You can attach a collider and a character controller to a model without needing a rigidbody.

Here’s how :

Drag your model into the scene/ project window.

if it has a mesh collider (or any collider) remove that component.

You now have just the model in the scene (mesh renderer, possibly animations).

From the Standard Assets folder (assuming you have already imported the character controllers package), find this folder :

Standard Assets > Character Controllers > Sources > Scripts

in this folder, there are 3 scripts you need. Drop them onto your model :

  • Mouse Look

  • Character Motor

  • FPS Input Controller

Finally, drag the camera onto your model, then set its position to X to 0 , Y to 1, Z to 0.

hit play and your model should be a FPS character controller =]

TO change the size of the collider :

Under Character Controller in the inspector, change the Height, Radius, and Center of the collider there.