When exactly to update camera and how?

Hello JME Gurus,



if I change any parameter of my camera object, translation, rotation, far near, left right, ratio etc. what exactly is the difference between these two method calls?



[java]

camera.update();

camera.updateViewProjection();

[/java]



Moreover, I still do not understand why there is a CameraNode and a camera object (the same with Light). I also didn’t understand this in JME 2.0 quite well. As far as I understand it works in this way.



The camera object is set to the constructor of the viewport. So, the camera is automatically an object relative to the absolute 0/0 position (the real origin of all origins). Using the setLocation method I can position the camera relative to this absolute origin but if I want to add the camera to a node, I have to construct a CameraNode object, pass the camera object to it and attach the CameraNode object to any desired node. Is this correct, and more interesstingly, why is that so complicated? Why don’t you write the camera properties directly to the CameraNode object? Due to bative code?



Thanks and regards,

Equi

You dont always need a CameraNode, simple as that. As for the update() methods you dont need to call these.