Changeset 5908 in orxonox.OLD for branches/spaceshipcontrol/src/world_entities
- Timestamp:
- Dec 4, 2005, 12:02:26 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/spaceshipcontrol/src/world_entities/space_ships/space_ship.cc
r5907 r5908 286 286 //orthDirection = orthDirection.cross (direction); 287 287 Vector upDirection (0.0, 1.0, 0.0); //z 288 288 289 289 290 290 … … 292 292 if( this->bUp ) 293 293 { 294 if(travelSpeed <= 5000) travelSpeed += 10; 294 accel += (this->getAbsDirV()).getNormalized(); 295 //if(travelSpeed <= 5000) travelSpeed += 10; 295 296 } 296 297 297 298 if( this->bDown ) 298 { 299 if(travelSpeed >= 10) travelSpeed -= 10; 299 { 300 accel -= (this->getAbsDirV()).getNormalized(); 301 //if(travelSpeed >= 10) travelSpeed -= 10; 300 302 } 301 303 302 304 if( this->bLeft /* > -this->getRelCoor().z*2*/) 303 305 { 304 velocityDir-= rightDirection;305 velocityDir.normalize();306 accel -= rightDirection; 307 //velocityDir.normalize(); 306 308 //rot +=Vector(1,0,0); 307 309 //rotVal -= .4; … … 309 311 if( this->bRight /* > this->getRelCoor().z*2*/) 310 312 { 311 velocityDir+= rightDirection;312 velocityDir.normalize();313 accel += rightDirection; 314 //velocityDir.normalize(); 313 315 //rot += Vector(1,0,0); 314 316 //rotVal += .4; … … 317 319 { 318 320 accel += upDirection; 321 //velocityDir.normalize(); 319 322 //rot += Vector(0,0,1); 320 323 //rotVal += .4; … … 323 326 { 324 327 accel -= upDirection; 328 //velocityDir.normalize(); 325 329 //rot += Vector(0,0,1); 326 330 //rotVal -= .4; 327 331 } 328 332 329 velocity = velocityDir*(time*travelSpeed);333 velocity += accel*(time); 330 334 //rot.normalize(); 331 335 //this->setRelDirSoft(Quaternion(rotVal, rot), 5);
Note: See TracChangeset
for help on using the changeset viewer.