Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4424 in orxonox.OLD


Ignore:
Timestamp:
May 31, 2005, 7:19:48 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: very fun effect when using the mouse to drive through debug level1, will be fixed…

Location:
orxonox/trunk/src/lib/coord
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/coord/pilot_node.cc

    r4423 r4424  
    8282  Vector move = accel * time;
    8383  this->shiftCoor (move);
     84
     85  Quaternion q1(M_PI/4 * this->pitch/400.0, Vector(1,0,0));
     86  this->shiftDir(q1);
    8487}
     88
    8589
    8690void PilotNode::process( const Event &event)
     
    106110      PRINTF(0)("Mouse moved by %d,%d to (%d,%d)\n", event.xRel, event.yRel,
    107111            event.x, event.y);
     112      this->pitch = event.x - 400;
     113      this->roll = event.y - 300;
    108114    }
    109115}
  • orxonox/trunk/src/lib/coord/pilot_node.h

    r4423 r4424  
    3333  bool bRight;           //!< right button pressed.
    3434
     35  int pitch;
     36  int roll;
     37
    3538  Vector* velocity;       //!< the velocity of the player.
    3639  float travelSpeed;     //!< the current speed of the player (to make soft movement)
Note: See TracChangeset for help on using the changeset viewer.