Changeset 4597 in orxonox.OLD for orxonox/trunk/src/util/track/pilot_node.cc
- Timestamp:
- Jun 11, 2005, 12:55:48 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/util/track/pilot_node.cc
r4456 r4597 1 1 2 2 3 /* 3 /* 4 4 orxonox - the future of 3D-vertical-scrollers 5 5 … … 28 28 \brief standard constructor 29 29 */ 30 PilotNode::PilotNode () 30 PilotNode::PilotNode () 31 31 { 32 32 this->setClassID(CL_PILOT_PARENT, "PilotNode"); 33 this->setName("PilotNode"); 33 34 34 35 travelSpeed = 30.0; … … 40 41 \brief standard deconstructor 41 42 */ 42 PilotNode::~PilotNode () 43 PilotNode::~PilotNode () 43 44 { 44 45 45 46 } 46 47 47 /** 48 /** 48 49 \brief ticks the node 49 \param time the time about whitch to tick 50 \param time the time about whitch to tick \ 50 51 */ 51 52 void PilotNode::tick(float time) … … 73 74 direction = q.apply(direction); 74 75 75 76 76 77 77 78 Vector orthDirection(0,0,1); 78 79 orthDirection = q.apply(orthDirection); 79 80 80 81 if( this->bUp) 81 82 accel = accel+(direction*acceleration); … … 83 84 accel = accel -(direction*acceleration); 84 85 if( this->bLeft) 85 accel = accel - (orthDirection*acceleration); 86 accel = accel - (orthDirection*acceleration); 86 87 if( this->bRight) 87 88 accel = accel + (orthDirection*acceleration); 88 89 89 90 Vector move = accel * time; 90 91 this->shiftCoor (move); 91 92 92 93 Quaternion q1(-M_PI/4 * this->roll/40000.0, Vector(0,0,1)); 93 94 Quaternion q2(-M_PI/4 * this->pitch/30000.0, Vector(0,1,0));
Note: See TracChangeset
for help on using the changeset viewer.