Difference Between Camera and CameraNode

Just curios what is the difference between the two?

One is a camera and the other is a node that can move a camera.

Do you know how to open the javadoc? Just wondering.

1 Like


I assume You wanted to know the difference between controlling the camera itself and controlling the camera via it’s “tripod” (in this case it’s node) while having camera itself just glued to this “tripod” right?
How much You can do with one approach and how much with the other?
What are the limits of both approaches?
Suggested applications / common use situations for them?

If so I’ll be happy to know that too :smile:

And If You really had no idea what “node” means, than just ignore my smartassing here but I hope it’s not the case :wink:

Camera is just the object that represents the main/current camera of your game, you can control many things besides the position/rotation. However, you cannot have a camera as a child of a node or attach children to the camera.

CameraNode allows you to treat the camera as just another Node in the scene (having a parent, attach children, use local positioning, etc). You can even determine if the camera controls cameraNode or viceversa

1 Like

So basically using Camera Node is superior in every aspect to Camera right? Or are there any downsides? For example would it be possible to recreate FlyByCamera using Camera Node? I mean so it works identically in every aspect? End user wouldn’t see the difference?

You can recreate FlyByCamera using Camera Node and I don’t think there will be any difference. There are no downsides of using Camera Node to be used like any node in my opinion. In many cases it will make your code a lot easier to maintain. However, it depends on your game project if you really need a Camera Node or not, or if this Camera Node will be in control or be controlled.

I use CameraNode for one of three reasons:

  1. I need to attach child objects to the camera.
  2. My code to move a camera is easier if I use local space instead of world space (the camera is attached to a parent node).
  3. I need to add multiple controls to the camera.