Character moving up/down & left/right while constantly going forward in Z

I'm attempting to create a 'flying' character that the player can move up or down on the y axis and left or right on the x axis, while constantly moving forward in the z axis.

The problem I'm seeing is that the player gets 'stuck' for lack of a better term on the x axis. The model will move a few pixels to the right, for example, then stop while still being able to move over to the left without issue. What I don't understand is why the player moving on the y axis isn't doing the same thing.


This is the script I'm using:

var speed:float = 10.0;

private var thisTranform:Transform;
private var thisCharacter:CharacterController;

function Start () {
    thisTranform = GetComponent(Transform);
    thisCharacter = GetComponent(CharacterController);

function Update() {
    dir = new Vector3(
        Input.GetAxis("Horizontal") * Time.deltaTime * speed,
        Input.GetAxis("Vertical") * Time.deltaTime * speed,

NOTE: The player is controlled with a Character Controller, not a Rigidbody. I've tried both FixedUpdate and Update without any change in behavior.

Any idea of why this is happening? Or, if there is a better way to do it, how? Links to tutorials / explanations appreciated.


Is it possible that you have attached a cube collider to the character controller?

If you have both on, it's likely that there will be collision between the two, screwing things up somewhat

Delete the 0.25 under the Input.GetAxis.