Background geometry rotates not correct

All objects are on the right position if i rotate my camera, but my

background geometry not.

I have used ‘FirstPersonHandler’ and class ‘NodeHandler’ but there is

no difference.

(The background geometry contains all objects and the camera object)

Does i have forget something ??

I’m afraid I don’t quite understand your problem. Can you say it again differently?

I have a Point-class that have a vertices array with a size of 2000 elements, also

int pointCount = 2000;

Vector3f coordinates[] = new Vector3f[pointCount];

ColorRGBA colors[] = new ColorRGBA[pointCount];



i return then

return (new Point ( name, coordinates, null, colors, null ));

Then i put this Point object into the same Node where the CameraNode

is.

At last, i want that this point object rotates around my camera.

(Or must i use 2000 Point objects ? )

How are you rotating the points? And what is the make-up of your scenegraph?

// Creates Points

//int pointCounter=1000;float scale=100.0f;long seed=8000;

Point p= (new MuchPoints( “something”, 1000, 100.0f, 8000 )).getPoints();

//p.setForceView(true);

// A node for Point object

Node bgNode = new Node(“bg”);

bgNode.attachChild§;





//A z-buffer

ZBufferState buf = renderer.createZBufferState();

buf.setEnabled(true);

buf.setFunction(ZBufferState.CF_LEQUAL);



//All stuff goes into rootNode

Node rootNode = new Node(“CrusaderWorld”);

rootNode.setWorldBound( new BoundingSphere( 1500.0f, new Vector3f(0,0,0) ) );

rootNode.updateWorldBound();

rootNode.setRenderState(buf);

//Attach bgNode to rootNode

rootNode.attachChild(bgNode);

.

.

.

//Attach an object node to rootNode

rootNode.attachChild(anObjectNode);



//Creating CameraNode

Camera cam = display.getRenderer().createCamera( display.getWidth(), display.getHeight() );

cam.setFrustumPerspective( 45.0f, (float)display.getWidth()/(float) display.getHeight(), 1.0f, 1000.0f );

cam.setFrame( new Vector3f(0.0f, 0.0f, 0.0f), new Vector3f(-1.0f, 0.0f, 0.0f), new Vector3f(0.0f, 1.0f, 0.0f), new Vector3f(0.0f, 0f, -1.0f) );

cam.update();

display.getRenderer().setCamera(cam);

camNode = new CameraNode(“Camera Node”, cam);

Matrix3f m3f = new Matrix3f();

//Sets the Node in negative z

m3f.fromAxisAngle(cam.getUp(), (float)Math.PI);

camNode.setLocalRotation(m3f);

camNode.setWorldBound( new BoundingSphere( 1500.0f, new Vector3f(0,0,0) ) );

camNode.updateWorldBound();

//Now my handler for mouse and keyboard

input = new NodeHandler(this, camNode, rendererName);

input.setKeySpeed(10.0f);

input.setMouseSpeed(1.0f);



//Attach the camera node to rootNode

rootNode.attachChild(camNode);



Now the problem is, attaching the point node ‘bgNode’ to ‘rootNode’

has no effect. No point i can see.

Render the point node ‘bgNode’ separately, the points i can see, but

rotates not correct.

Also the use of many points lets the objects rotations become incorrect.



I assume, that mixing ‘Point’ objects and ‘TriMesh’ objects in the

same node is a problem for the camera.