Hello,
I have used KeyEvent methods to translate camera on  the scene.
The problem is when I repaint the canvas3D the scene becomes white for a very short time.
Is there a way to remove this problem ?
 
Regards,
Saeed
 
  public void keyPressed(KeyEvent e) {
    char keyChar = e.getKeyChar();
    int KeyCode = e.getKeyCode();
    if( keyChar == 'Z' || keyChar == 'z' ){
      z_camera -= 10;
      View_Transform3D.setTranslation(new Vector3f(mid_city_x, mid_city_y, z_camera));
      camera3d.rotX(1.5f);
      camera3d.mul(View_Transform3D);
      View_TransformGroup.setTransform(camera3d);
      c3d.repaint();
    }
    if( keyChar == 'X' || keyChar == 'x' ){
      z_camera += 10;
      View_Transform3D.setTranslation(new Vector3f(mid_city_x, mid_city_y, z_camera  ));
      camera3d.rotX(1.5f);
      camera3d.mul(View_Transform3D);
      View_TransformGroup.setTransform(camera3d);
      c3d.repaint();
}
  }


Yahoo! Sports
Rekindle the Rivalries. Sign up for Fantasy Football =========================================================================== 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".

Reply via email to