x


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.

more ▼

asked Jan 29, 2012 at 12:04 AM

Xatoku gravatar image

Xatoku
179 232 163 173

(comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3238
x3220
x1545
x865
x12

asked: Jan 29, 2012 at 12:04 AM

Seen: 1189 times

Last Updated: Jan 29, 2012 at 12:04 AM