- Home /
Character Controller Jittering
Okay. My character/enemy has to rotate on the X & Z values when following targets, but I understand that the character controller doesn't rotate in these directions. So currently, if I use:
transform.LookAt(Target);
With
moveDirection.y -= gravity * Time.deltaTime;
The character will start jittering all over the place. I think this is because it's forcing the controller down and trying to ground it whilst the transform is trying to rotate it. Is there a way around this problem? I've heard that there's a rigidbody solution, but would I still be able to use something like:
MyController.Move(forward * 5 * Time.deltaTime);
With any other method? I need to be able to move the character with physics as I would normally, basically being able to do everything I can with the character controller, but be able to rotate on each axis and ground the character simaultaneously. If anyone knows of any alternatives, please let me know.
Thanks in advance.