I have spent several hours searching wiki/forum in trying to find out why something as simple as the camera node, in my instance, doesnt appear to be working. I have attached a box to the CameraNode and I can see this move around the scene. The problem is the camera is not following it.
There must be something obvious that I am missing. Please help, many thanks.
Here is my code…
cn=new CameraNode("CN",new CameraControl(getSimpleApplication().getCamera(),CameraControl.ControlDirection.SpatialToCamera));
cn.setControlDir(CameraControl.ControlDirection.SpatialToCamera); // added a second time as a test
I looked at the source code for CameraNode and it appears to add a Control which I presume become active once the CameraNode is attached to an active scene graph? There doesnt seem to be anything else that all the examples I have examined include in addition to what I have already have.
I have found out what the problem was. For some reason the activation event for when a camera node was selected was not being triggered. Completely my stupid error. Thanks anyway for assisting me along the path…