Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6206 in orxonox.OLD for branches/christmas_branche/src


Ignore:
Timestamp:
Dec 21, 2005, 2:08:46 AM (19 years ago)
Author:
bensch
Message:

christmas: split control to X and Y

Location:
branches/christmas_branche/src/world_entities/creatures
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/christmas_branche/src/world_entities/creatures/md2_creature.cc

    r6205 r6206  
    9999  //this->getWeaponManager()->addWeapon(turret, 3, 0);
    100100
    101   this->getWeaponManager()->changeWeaponConfig(1);
     101  this->getWeaponManager()->changeWeaponConfig(0);
    102102}
    103103
     
    125125  travelSpeed = 15.0;
    126126  this->velocity = Vector(0.0,0.0,0.0);
    127   this->mouseDir = this->getAbsDir();
    128127
    129128//   GLGuiButton* button = new GLGuiPushButton();
     
    276275
    277276  //orient the MD2Creature in direction of the mouse
    278   this->setAbsDir( /*rotQuat*/ mouseDir);
     277  this->setAbsDir( /*rotQuat*/ mouseDirX);
    279278
    280279  this->getWeaponManager()->tick(time);
     
    377376    this->xMouse = event.xRel;
    378377    this->yMouse = event.yRel;
    379     mouseDir *= (Quaternion(-M_PI/4*xMouse*mouseSensitivity, Vector(0,1,0))*Quaternion(-M_PI/4*yMouse*mouseSensitivity, Vector(0,0,1)));
     378    this->mouseDirX *= Quaternion(-M_PI/4*xMouse*mouseSensitivity, Vector(0,1,0));
     379    this->mouseDirY *= Quaternion(-M_PI/4*yMouse*mouseSensitivity, Vector(0,0,1));
    380380//     if( xMouse*xMouse < 0.9)
    381381//      this->setAbsDir(mouseDir);
  • branches/christmas_branche/src/world_entities/creatures/md2_creature.h

    r6198 r6206  
    6868
    6969    Vector                velocity;           //!< the velocity of the player.
    70     Quaternion            mouseDir;           //!< the direction where the player wants to fly
     70    Quaternion            mouseDirX;           //!< the direction where the player wants to fly
     71    Quaternion            mouseDirY;           //!< the direction where the player wants to fly
    7172    Quaternion rotQuat;
    7273    float                 travelSpeed;        //!< the current speed of the player (to make soft movement)
Note: See TracChangeset for help on using the changeset viewer.