- Home /
How to Rotate a Character using the mouse? [JS]
I'm trying to rotate my character using the mouse, not the a or d keys, but the mouse. I'm working on an FPS engine for when I need one. It's going well so far until I get here. I have an empty that has a box collider and a Character Controller. Inside that empty is the Camera. Inside the camera is a FPS rig, which is just arms. I'm trying to rotate the empty on the Y axis and the Camera on the X axis. This is what I ended up with: "transform.Rotate(Vector3(0, Input.GetAxis("Mouse X") * 50, 0));" I did something of the sort before and it partially worked. Now it simply won't work. The script is a component of the Empty. Why isn't this working?
Your answer
![](https://koobas.hobune.stream/wayback/20220612075226im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Character Controller with Relative Gravity? 1 Answer
RigidBody Character Controller Bug 0 Answers
Face Direction Movement using CharacterController 1 Answer
Problem detecting ground with collision flags and controller.move (vector3.down) 1 Answer
Disable diagonal movement on 2D character controller 1 Answer