예제 #1
0
 public void performAction(float time, Event e) {
   /* sM.translate(0,0,0.1f);
   s.setLocalTranslation(sM);
   s.updateWorldBound();
   */
   Matrix3D rot = s.getLocalRotation();
   Vector3D dir = new Vector3D(0, -1, 1);
   dir = dir.mult(rot);
   dir.scale((double) (speed * time));
   s.translate((float) dir.getX(), (float) dir.getY(), (float) dir.getZ());
   s.updateWorldBound();
 }
  public void setEarParameters() {
    Matrix3D avDir = (Matrix3D) (player1.getWorldRotation().clone());
    float camAz;

    if (!isGPOn) {
      camAz = cam1Controller.getAzimuth();
    } else {
      camAz = cam1GPController.getAzimuth();
    }

    avDir.rotateY(180.0f - camAz);
    Vector3D camDir = new Vector3D(0, 0, 1);
    camDir = camDir.mult(avDir);
    audioMgr.getEar().setLocation(camera1.getLocation());
    audioMgr.getEar().setOrientation(camDir, new Vector3D(0, 1, 0));
  }