Character falls through terrain.

Heyoo, title says it all really, I can’t seem to stop my character from falling through the terrain, I have a character controller and the terrain has a terrain collider, but he still falls through, any help is appreciated (:

Bump!

I’m having similar issues with an NPC even though the character controller has the exact settings as the playable character. It’s not completely on the ground, but when it walks on a slope it falls halfway through.

2227491--148363--charCtrlSettins.png

Craft, here’s a script that fixed the problem:

#pragma strict

var gravity = 20.0;
var verticalSpeed= 0.0;
private var collisionFlags : CollisionFlags;  // The last collision flags returned from controller.Move
function Update() {
  
    ApplyGravity ();
    // Calculate actual motion
    var movement = Vector3 (0, verticalSpeed, 0) + Vector3.zero;
    movement *= Time.deltaTime;
  
    // Move the controller
    var controller : CharacterController = GetComponent.<CharacterController>();
    collisionFlags = controller.Move(movement);
}

function ApplyGravity ()
{
        if (IsGrounded ())
            verticalSpeed = 0.0;
        else
            verticalSpeed -= gravity * Time.deltaTime;
}

function IsGrounded ()
{
    var controller : CharacterController = GetComponent.<CharacterController>();

    return (controller.collisionFlags == CollisionFlags.Below);
}

Reference to this script:
http://gamedev.stackexchange.com/questions/104825/character-controller-passes-through-mesh-collider/104856#104856