Hi!
I am making the project of race aim, using for the Java3D design.
It consists of simulating the movement of fish according to different behaviors.
I have a problem at the time of making diverse rotations and transferings followed, on transformGroup modified.
Here this the code of a testing program:

*********************

Universal SimpleUniver = new SimpleUniver (canvas3d);
Fish fish = new Fish ();
fish.imagPez = pez.creaPez ();
universo.getViewingPlatform () .setNominalViewingTransform ();
pez.TrasladaPez (new Vector3f (0.3f, 0.5f, 0.0f), (float) (Math.PI));
universo.addBranchGraph (fish.imagPez);
pez.TrasladaPez (new Vector3f (- 0.5f, - 0.5f, 0.0f), (float) (Math.PI/2));
universo.addBranchGraph (fish.imagPez);


//Here the call to TrasladaPez
public void TrasladaPez (Vector3f time, float angle) {

Transform3D to rotate = new Transform3D();
rotar.rotZ (angle);
rotar.setTranslation (time);
System.out.println (to rotate);
TransformGroup rotarGrupo = new TransformGroup (to rotate);
rotarGrupo.getTransform (to rotate);
rotarGrupo.setCapability (TransformGroup.ALLOW_TRANSFORM_WRITE);
rotarGrupo.setCapability (TransformGroup.ALLOW_TRANSFORM_READ);
this.imagPez.detach ();
Node node =this.imagPez.getChild (1);
this.imagPez.removeChild (1);
rotarGrupo.addChild (node);
this.imagPez.addChild (rotarGrupo);

}

********************



Basically what I do in this testing program is to make a call to the TrasladaPez function (), with parameters the vector on which is going away to make the transfering and the angle on which it is wanted to rotate this.

Then, the first call does well,
pez.TrasladaPez (new Vector3f (0.3f, 0.5f, 0.0f), (float) (Math.PI));

But in the second call the fish makes a movement undesired:
pez.TrasladaPez (new Vector3f (- 0.5f, - 0.5f, 0.0f), (float) ( Math.PI/2));
It is as if all the single screen instead of the fish was rotated, the problem has to be when applying the rotation, since when happening like east parameter code:

pez.TrasladaPez (new Vector3f (- 0.5f, - 0.5f, 0.0f), (float)(0.0));
The fish moves well.

So that something is understood better associate some screens with the corresponding parameters:

(Without calls to TrasladaPez ())
Coord. (0,0, 0,0, 0,0);


(With a single call to TrasladaPez ())
pez.TrasladaPez (new Vector3f (0.3f, 0.5f, 0.0f), (float) (Math.PI));
Coord. (0,3, 0,5, 0,0);

(2 followed transformations, without modifying the angle in 2)
pez.TrasladaPez (new Vector3f (0.3f, 0.5f, 0.0f), (float) (Math.PI));
pez.TrasladaPez (new Vector3f (- 0.3f, - 0.8f, 0.0f), (float) (0.0));
Coord. (0,0, - 0,3, 0,0);



(2 followed transformations, modifying the angle in 2)
pez.TrasladaPez (new Vector3f (0.3f, 0.5f, 0.0f), (float) (Math.PI));
pez.TrasladaPez (new Vector3f (- 0.3f, - 0.8f, 0.0f), (float) (Math.PI/2));
Coord. approx (- 0,4, - 0,4, 0,0);
Coord. Deberian to be: Coord. (0,0, - 0,3, 0,0);

Not is possible insert images.
If somebody can help me, i send him the screens to understand well my problem.

Thanks!