Translating viewplatform causes trouble

My scene is setup like this:

* I have a 2D textured plane on z=0 from x,y=1,1 to x,y=-1,-1

* There are a couple of objects located on the plane, basically pyramids, pointing upwards (to z+), but their base is at z=0, on the plane, during the course of the application they are moving across the plane, being translated along the x/y axis, they are scaled down when the scene is setup

After that is setup, I add some behaviors to the viewplatform transform (universe.getViewingPlatform().getViewPlatformTransform()), behaviors like MouseTranslate.

When I use the behaviors to move the eye position, the 2D plane seems to turn and the pyramids sink through the surface or (when on the other side) rise above the surface. So, instead of just the camera moving (which is what I want), the different objects move through eachother while the camera is moving.

The same thing happens when I attach the behaviors to the rootTransform object.

Can anybody tell me how to shut this behavior off, as in, move the camera without changing the rest of the scene. Thnx.

The pyramid geometry:

Geometry createGeometry(int face, Color3f color, Color3f topColor){

TriangleArray geomList =new TriangleArray(3, TriangleArray.COORDINATES | TriangleArray.COLOR_3);

Point3f point =new Point3f();

switch (face){

case 0:

point.set(-1.0f, 1.0f, 0.0f);

geomList.setCoordinate(0, point);

geomList.setColor(0, color);

point.set(-1.0f, -1.0f, 0.0f);

geomList.setCoordinate(1, point);

geomList.setColor(1, color);

point.set(0.0f, 0.0f, 2.0f);

geomList.setCoordinate(2, point);

geomList.setColor(2, topColor);

break;

case 1:

point.set(1.0f, -1.0f, 0.0f);

geomList.setCoordinate(0, point);

geomList.setColor(0, color);

point.set(1.0f, 1.0f, 0.0f);

geomList.setCoordinate(1, point);

geomList.setColor(1, color);

point.set(0.0f, 0.0f, 2.0f);

geomList.setCoordinate(2, point);

geomList.setColor(2, topColor);

break;

case 2:

point.set(-1.0f, -1.0f, 0.0f);

geomList.setCoordinate(0, point);

geomList.setColor(0, color);

point.set(1.0f, -1.0f, 0.0f);

geomList.setCoordinate(1, point);

geomList.setColor(1, color);

point.set(0.0f, 0.0f, 2.0f);

geomList.setCoordinate(2, point);

geomList.setColor(2, topColor);

break;

case 3:

point.set(1.0f, 1.0f, 0.0f);

geomList.setCoordinate(0, point);

geomList.setColor(0, color);

point.set(-1.0f, 1.0f, 0.0f);

geomList.setCoordinate(1, point);

geomList.setColor(1, color);

point.set(0.0f, 0.0f, 2.0f);

geomList.setCoordinate(2, point);

geomList.setColor(2, topColor);

break;

}

return geomList;

}

//called like this

removeGeometry(0);

addGeometry(createGeometry(0, glColor, glTopColor));

addGeometry(createGeometry(1, glColor, glTopColor));

addGeometry(createGeometry(2, glColor, glTopColor));

addGeometry(createGeometry(3, glColor, glTopColor));

The 2D plane geometry:

QuadArray plane =new QuadArray(4, GeometryArray.COORDINATES

| GeometryArray.TEXTURE_COORDINATE_2 );

Point3f p =new Point3f(-1.0f, 1.0f, 0.0f);

plane.setCoordinate( 0, p);

p.set(-1.0f, -1.0f, 0.0f);

plane.setCoordinate( 1, p);

p.set(1.0f, -1.0f, 0.0f);

plane.setCoordinate( 2, p);

p.set(1.0f, 1.0f, 0.0f);

plane.setCoordinate( 3, p);

TexCoord2f q =new TexCoord2f( 0.0f, 1.0f);

plane.setTextureCoordinate(0, 0, q);

q.set(0.0f, 0.0f);

plane.setTextureCoordinate(0, 1, q);

q.set(1.0f, 0.0f);

plane.setTextureCoordinate(0, 2, q);

q.set(1.0f, 1.0f);

plane.setTextureCoordinate(0, 3, q);

[4522 byte] By [logophobiaa] at [2007-11-27 5:03:12]
# 1

I copied your code into my working 3D scene. Zoomed out a little and saw a nice pyramid pointing up at me, its base on a square surface. I have buttons that allow me to move around the scene. I believe they give the same results as your "moving camera". Everything looks OK to me.

One thing you may not realize. The 3D scene is in perspective. The pyramid changes appearance as the position of the camera moves. Could this be the problem you are seeing?If not I can send you the code for translating the view platform transform3D. But I'm thinking you already have that part well in hand.

mikelizzia at 2007-7-12 10:21:16 > top of Java-index,Security,Cryptography...
# 2
deletedMessage was deleted by: logophobia
logophobiaa at 2007-7-12 10:21:16 > top of Java-index,Security,Cryptography...
# 3
Ok, I fixed it. Stupid problem, I inherited all my objects from orientedshape3D instead of Shape3D which caused all objects to face the camera.
logophobiaa at 2007-7-12 10:21:16 > top of Java-index,Security,Cryptography...