in my programm i am looking in front of a rotating colorcube. when a value "stop" gets 1 i want to STOP the rotation. thats no problem so far! But when it stops it should show me the RED side of the colorcube! how can i do that ?
here is some of my code!
Transform3D drehCube3D = new Transform3D();
TransformGroup drehGroup = new TransformGroup();
drehGroup.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
TransformGroup tgdrehfinal = new TransformGroup();
Vector3f v3DrehCube = new Vector3f(0f, 1f, 0f);
drehCube3D.setTranslation(v3DrehCube);
ColorCube drehbox = new ColorCube(0.3);
drehbox.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
drehGroup.setTransform(drehCube3D);
drehGroup.addChild(drehbox);
AlphadrehAlpha = new Alpha(1000,1000);
rotint = new RotationInterpolator(AlphadrehAlpha, drehGroup );
if ( stop == 1){
AlphadrehAlpha.pause();
System.out.println("yes");
}
i set my alpha 0nPause when stop gets 1 ! but NOW it stops at any point. how can I say that it should stop at the right position(when i can see the red side)?
Instead of calling AlphadrehAlpha.pause() when stop == 1, just check whether stop == 1 and the rotation of the color cube is set to a value that shows the red side.