CharacterController.Move() is causing unwanted vertical movement . . . how to fix?

Alright, so the Move() function of the character controller has me stumped. I have a little capsule in my scene and I just wanted to get it moving around, so I wrote the code below. Here’s the thing - when I press any two directions (up and right, left and up, etc), the Move() function of the CharacterController starts changing the y values of the character’s position. I cannot for the life of me figure out why this is happening. Using transform.position += does not yield the same problem. Any help would be MUCH appreciated.

using UnityEngine;
using System.Collections;

public class DummyPlayer : MonoBehaviour {
	protected CharacterController myCharacterController;
	void Start () {
		myCharacterController = this.GetComponent<CharacterController>();
	void Update () {
	private void ProcessInput() 
		float analogZ = Input.GetAxis("Vertical");
		float analogX = Input.GetAxis("Horizontal");
		Vector3 moveVect = new Vector3(analogX, 0, analogZ); 
		if(moveVect.y != 0 || this.transform.forward.y != 0)
			Debug.Log(moveVect.y + " " + this.transform.forward.y); //never called
		//this.transform.position += moveVect*Time.deltaTime*40f;
		myCharacterController.Move(moveVect*Time.deltaTime*40f); //why does this affect my y value when the line commented out above doesn't?

Also, the variables are named analogX and analogZ because eventually I’d like to get input from a joystick - for now I’m just using the keyboard.


So after some experimenting around with project settings, I added the following lines to the end of my ProcessInput() function:

if(myCharacterController.collisionFlags != CollisionFlags.None)
	Debug.Log("I understand nothing anymore.");

then ran the program. When I perform the steps necessary to recreate my original problem, every few updates, I see the Debug statement in the console. Mind you, that aside from the default camera Unity adds when you start a project, I have nothing in the scene except for my childless, parentless capsule. I cannot fathom how it is colliding with itself. Please help!

Hahaha, alright people, I found the answer - ready for the face-palm moment? The capsule WAS colliding with itself - I had forgotten that CharacterController creates its own collider, and thus forgot to remove the default collider that is attached when one creates a game object. Everything is working now - thanks to both the people who tried helping me before I figured it out!

The lesson of the story for those who have similar problems with a CharacterController - first check to see if your character has any other colliders on it.

maybe add the line:

Vector3 moveVect = new Vector3(analogX, 0, analogZ); // after this
moveVect = transform.TransformDirection(moveVect); // add this line