- Home /
camera rotation interferes with controller rotation
My first person controller rotates nicely before, it receives the rotation data from my iPad and rotate with the Y axe continually if the data is not "0". But when I want to rotate the camera, wired thing happens, the controller can no longer rotate. Here is my code:
EmptyCameraTransform.rotation = Quaternion.Euler(doAngle, 0, 0);
transform.Rotate(0, trans2*Time.deltaTime, 0);
EmptyCameraTransform
is the transform of the parent of the Main Camera
, I'm not directly controlling the camera. transform
is the transform of the controller. So , if I comment out the first line of code, the controller can rotate normally, if not, it cracks. Can anyone give some advice? Thanks.
Your answer
![](https://koobas.hobune.stream/wayback/20220613120604im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Make the player go into the direction I am looking at 0 Answers
Rotating local Z-axis (roll) on a MouseLook (or similarly) controlled camera? 2 Answers
Camera following Pivot not working 1 Answer
RTS Camera Rotation and Movement 0 Answers
How do I properly rotate an FPS camera with a joystick? 1 Answer