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:
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.
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a user guide.
If you are a new user, check out our FAQ for more information.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
For troubleshooting common problems with Unity 5.x Editor (including Win 10).
Answers and Comments
4 People are following this question.
How to use character controller to push down hinge joint properly
RigidBody Character Controller Bug
jet pack physics with character controller
Character Controller children of a car: Inertia effect, delay effect, what???
Rigid body floating the air when I jump at a wall... how do I fix?