ridgid body detection by 3d character controller

i made a heavy model of 21mb in maya and then imported the model in unity. i have been facing two problems which are as follows :

  1. i was unable to import the maya model into unity … when i imported the model in was showing the model to me in pieces in unity , i even tried to import it will all the formats.
  2. my 3d character is unable to detect the model. can u please tell how can the 3d character can detect the model and move on the stairs and other things.

my code for the rigidbody detection

using UnityEngine;

using System.Collections;

public class DontGoThroughThings : MonoBehaviour


public LayerMask layerMask; //make sure we aren't in this layer 

public float skinWidth = 0.5f; //probably doesn't need to be changed 

private float minimumExtent; 

private float partialExtent; 

private float sqrMinimumExtent; 

private Vector3 previousPosition; 

private Rigidbody _myTransform; 

//initialize values 

void Awake() 


   _myTransform = rigidbody; 

   previousPosition = _myTransform.position; 

   minimumExtent = Mathf.Min(Mathf.Min(collider.bounds.extents.x, collider.bounds.extents.y), collider.bounds.extents.z); 

   partialExtent = minimumExtent * (1.0f - skinWidth); 

   sqrMinimumExtent = minimumExtent * minimumExtent; 


void FixedUpdate() 


   //have we moved more than our minimum extent? 

   Vector3 movementThisStep = _myTransform.position - previousPosition; 

   float movementSqrMagnitude = movementThisStep.sqrMagnitude;


   if (movementSqrMagnitude > sqrMinimumExtent) 


      float movementMagnitude = Mathf.Sqrt(movementSqrMagnitude);

      RaycastHit hitInfo; 


      //check for obstructions we might have missed 

      if (Physics.Raycast(previousPosition, movementThisStep, out hitInfo, movementMagnitude, layerMask.value)) 

         _myTransform.position = hitInfo.point - (movementThisStep/movementMagnitude)*partialExtent; 



   previousPosition = _myTransform.position; 



As for the pieces, the mesh is being divided to account for a polycount in excess of the max currently supported.

As for the detection, mesh collider on the model may be the problem, I suppose, due to the same issue, not really sure.