Hi,
in a SimpleJMEApplet i want to rotate and move the camera by (for example) a keyhit.
The movement seems not to be a problem. Its done by setting the cameras translation in the simpleAppletUpdate() function.
Now the camera shall rotate and look down vertically from the current position. It works with lookAt(cam.getLocation()) but that is too quick. I would like to rotate the cameras view downward slowly .
Any ideas how to do that?
Thanks
VR
Quaternion.slerp() is an option.
But if you use this, you have to handle direction/up/left vector directly.
or
create new camera direction/ up vector per each update using Quaternion.fromAngleAxis()
the best solution to this is to create a CameraNode and attach the camera to it. then you can just rotate the CameraNode or any number of parent nodes and the camera will be updated automatically.