Hello: the setNominalViewingTransform() put the camera 2.4 meters back in the Z axis. For putting the camera in another position I am using the folloging code:
TransformGroup VpTG = simpleU.getViewingPlatform().getViewPlatformTransform(); float Zcamera = 12; //put the camera 12 meters back Transform3D Trfcamera = new Transform3D(); Trfcamera.setTranslation(new Vector3f(0.0f, 0.0f, Zcamera)); VpTG.setTransform( Trfcamera ); Hope it was useful. Rafael Pereira Software bricklayer :-) -----Mensaje original----- De: Vidya Sagar [mailto:[EMAIL PROTECTED]] Enviado el: lunes, 03 de junio de 2002 23:58 Para: [EMAIL PROTECTED] Asunto: [JAVA3D] How to change the camera position Hi all, I want to move my camera 5 units back from the original position. Could anyone give me any hints or sample code of how to do this? At present I am using the following sample code: GraphicsConfiguration config = SimpleUniverse.getPreferredConfiguration(); Canvas3D canvas3D = new Canvas3D(config); SimpleUniverse simpleU = new SimpleUniverse(canvas3D); View view = new View(); view.setProjectionPolicy(View.PERSPECTIVE_PROJECTION); view.setFrontClipDistance(0.1); view.setBackClipDistance(100.0); simpleU.getViewingPlatform().setNominalViewingTransform(); Thanks in advance, Sagar. __________________________________________________ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help". ----------------------------------------------------------------- Este correo electr�nico y, en su caso, cualquier fichero anexo al mismo, contiene informaci�n de car�cter confidencial exclusivamente dirigida a su destinatario o destinatarios. Queda prohibida su divulgaci�n, copia o distribuci�n a terceros sin la previa autorizaci�n escrita de Indra. En el caso de haber recibido este correo electr�nico por error, se ruega notificar inmediatamente esta circunstancia mediante reenv�o a la direcci�n electr�nica del remitente. ----------------------------------------------------------------- The information in this e-mail and in any attachments is confidential and solely for the attention and use of the named addressee(s). You are hereby notified that any dissemination, distribution or copy of this communication is prohibited without the prior written consent of Indra. If you have received this communication in error, please, notify the sender by reply e-mail. ----------------------------------------------------------------- ==========================================================================To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
