title: Unity3D Collision with character controller
body: <p>i'm new to unity and i'm trying to make an endless runner. When my player (a ball) hits one of the walls the game needs to go the scene: LostMenu. My problem is that the collision doesn't work. Nothing happens when they collide... Here are the inspectors on both the player and the walls: Walls <a href="http://prntscr.com/a2pgzm" rel="nofollow">http://prntscr.com/a2pgzm</a> Player <a href="http://prntscr.com/a2ph66" rel="nofollow">http://prntscr.com/a2ph66</a> .</p>
  
  <p>The collision script on the walls:</p>
  
  <pre><code>using UnityEngine;
  using System.Collections;
  
  public class LostByWallCSR : MonoBehaviour
  {
      void OnCollisionEnter (Collision col)
      {
          if(col.gameObject.name == "Player")
          {
               Application.LoadLevel("LostMenu");
               Debug.Log ("WORKS!");
          }
     }
  }
  </code></pre>
  
  <p>The movement script on the player:</p>
  
  <pre><code>using UnityEngine;
  using System.Collections;
  
  public class CharacterControllerz : MonoBehaviour {
  
  public float speed = 5f;
  public float gravity = 20f;
  private Vector3 moveDirections = new Vector3();
  private Vector3 inputs = new Vector3();
  
  void FixedUpdate()
  {
      CharacterController cc = GetComponent&lt;CharacterController&gt;();
      if (cc.isGrounded) 
      {
          if (Input.GetKey("left"))
              inputs.z = 3;
          else if (Input.GetKey("right"))
              inputs.z = -3;
          else
              inputs.z = 0;
  
          moveDirections = transform.TransformDirection(inputs.x, 0, inputs.z) * speed;                    
      }
  
      inputs.x = 5;
      moveDirections.y = inputs.y - gravity;
      cc.Move(moveDirections * Time.deltaTime);
  }
  }
  </code></pre>
  
  <p>Any idea on how to setup the collision properly? Attaching a rigibody is not helping it. Unless i'm missing something ofcourse.</p>