need Help rotate camera in the right way

Hey everyone,

here’s my problem:

I’m having problem with rotation my camera, it is rotated so that it has a sort of an isometric view on some buildings, and the buildings are around my camera, it’s going to be a sort of a showroom. But now I want the camera to rotate around, but when I do that with my script, it will go up side down and stuff. I was wondering if someone knows a way to fix this.

Camera Settings:

Rotation: 30, 90, 0

My Script:

public float rotationSpeed = 210;

void Update () {

transform.Rotate(Input.GetAxis("Left")* Vector3.up * -rotationSpeed * Time.smoothDeltaTime);
transform.Rotate(Input.GetAxis("Right") * Vector3.up * rotationSpeed * Time.smoothDeltaTime);

}

I really need the camera to stay this way since it’s for a project for school.

if you need any more info please ask

Thanks in advance,

Niels

Try:

a. Put the camera under another game object (that’s reset to default values) and rotate that game object instead.

b. RotateAround() method.

c. Add Space.World argument to the end of the Rotate method.

Oh wow, thanks ;p I’ll try A. =] should work, weird that I didn’t think of that

oh right! Option A should work… Thank you very much, didn’t think of that, I’ll try it right away