How to rotate camera

Hi I’m trying to rotate the camera in a 315 angle, but all I do is invert it in a strange way. I’m trying to make some sort of isometric 3d game. Here’s an example of what I want to achive

And also I want to lock the movement of the camera along the z, x axis, I have no idea how to do that.
thnaks.

To get an isometric view, try something like
[java]
cam.setLocation(Vector3f.UNIT_XYZ.mult(10f));
cam.lookAtDirection(Vector3f.UNIT_XYZ.negate(), Vector3f.UNIT_Y);
[/java]

If you
[java]
flyCam.setEnabled(false);
[/java]

that will stop the FlyByCamera from moving the camera.

1 Like
@sgold said: To get an isometric view, try something like [java] cam.setLocation(Vector3f.UNIT_XYZ.mult(10f)); cam.lookAtDirection(Vector3f.UNIT_XYZ.negate(), Vector3f.UNIT_Y); [/java]

If you
[java]
flyCam.setEnabled(false);
[/java]

that will stop the FlyByCamera from moving the camera.

Thanks!, it’s like the one I tried to make, now I have to figure it out how to move the camera without changing the angle. Thanks a lot!

In case it isn’t obvious, cam.setLocation(x, y, z) moves the camera without changing the direction.