it doesn’t work :S I am sorry I’m still new at this.
is center a Vector3f(0,0,0) ??
I used camRot.lookAt(center.subtract(camPos)); but need to add another Vector3f to it as lookAt takes two vectors anyways my code is:
else if (name.equals("moveAroundPositive") && keyPressed) {
System.out.println("Rotating camera around Z axis Positively");
// position must be on a circle around the Z axis
// Vector with radius length = 10
Vector3f camPos = new Vector3f(0,0,10);
Vector3f center = new Vector3f (0,0,0);
Quaternion camRot = new Quaternion();
Quaternion tempQuat = new Quaternion();
// create a quaternion based on the angles passed
// and multiplied by camPos
tempQuat.fromAngles(0,tpf,0).multLocal(camPos);
//tempQuat.fromAngles(0,rota,0).multLocal(camPos);
camRot.lookAt(center.subtract(camPos), camPos);
//camRot.lookAt(new Vector3f(0,0,0), new Vector3f(0,1,0));
//rota +=1;
cam.setLocation(camPos);
cam.setRotation(camRot);
}
again, i’m sorry but although I have some expertise in java, I never played with graphics before, thanks for your help