- Home /
CharacterCollider.Move always goes up!?!?!
No matter what direction I try to move using .Move I go up! Transform works perfect, however it does not account for collision! I need to use .Move! Can someone please help me?
Below is some example code. You can put in any direction. x or z it doesn't matter. However y does seem to go down properly.
CharacterController controller = (CharacterController)GetComponent(typeof(CharacterController));
moveDirection.x = 4.0f; controller.Move(moveDirection * Time.deltaTime);
again.. I can do this.transform.Translate perfectly! I am not sure what is going on!
Answer by JasonWIR · Mar 27, 2011 at 03:15 PM
I had a huge step-offeset variable on my character controller which was causing it.
Answer by Eric5h5 · Mar 11, 2011 at 06:24 AM
I guess your moveDirection variable has something greater than 0 in the y component.
Thanks. Turns out it was the step-offset of my character controller.