- Home /
Question by
Creeper9207 · Oct 03, 2016 at 05:59 AM ·
c#camera rotatecamera movement
How do I rotate a camera on the Z axis relative to it's rotation on the X axis.
I have a camera that is currently rotated on the X axis, i want to rotate it on the Z axis relative to the X axis rotation. Here is a better example:
What it currently does:
What I would like it to do:
This is the closest I have gotten to fixing it:
if (Input.GetKey(KeyCode.RightArrow)) {
rotateZ = getnew(rotateZ + time*(90-rotateX));
rotateY = getnew(rotateY - rotateX*time);
}
here is the entire script:
Comment
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
How to rotate camera diagonally over players shoulder while still facing towards players direction 0 Answers
How to rotate camera diagonally over players shoulder while still facing towards players direction 0 Answers
How can I make the camera follow the player's rotation only on the z axis? 1 Answer