- Home /
Question by
hiro3212 · May 26, 2015 at 06:17 AM ·
2drotationmovementcharactercontroller
[2D] CharacterController rotation
I've programmed a little game to test my unity skills. Now I've got a problem: I want to rotate my Player (a Capsule). So I've written a script, that rotates the mesh, when the player presses a key:
float rotation = Input.GetAxis("Rotate") * Time.deltaTime * rotationSpeed;
transform.Rotate(0, 0, -rotation);
This works, but the CharacterController, which checks for collisions, is not rotating with the mesh.
Is there any way to rotate the CharacterController with the mesh of the player?
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613200244im_/https://answers.unity.com/themes/thub/images/avi.jpg)