Hello, I want the Camera to rotate in a circle around a center and to stay focused on that center.
It works fine when use it like this (i’m just posting the relevant stuff):
camDir = Vector3f(x,y,z); 'fixed point to look at'
camPos = myRotateFunction(cam.getLocation(), camDir, offset,); 'rotating the pos ot the cam'
cam.setLocation(camPos); ' put the cam right there'
cam.lookAt(camDir, Vector3f.UNIT_Y); 'look at the defined point'
But it is not working when i use it like this
camDir = cam.getDirection(); ' save where the cam looks now'
camPos = myRotateFunction(cam.getLocation(), camDir, offset); 'rotating the pos ot the cam'
cam.setLocation(camPos); ' put the cam right there'
cam.lookAt(camDir, Vector3f.UNIT_Y); 'look at center i saved before (but it doesnt)
The problem ist that the cam always looks at the point (0,0,0).
When I use “cam.lookAtDirection” instead of “cam.lookAt” then the cam always looks at the same direction and not at the desired point. What did I get wrong ??