Changeset 6537 in orxonox.OLD for branches/spaceshipcontrol/src/world_entities
- Timestamp:
- Jan 18, 2006, 1:36:27 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/spaceshipcontrol/src/world_entities/space_ships/space_ship.cc
r6509 r6537 291 291 292 292 // this is the air friction (necessary for a smooth control) 293 if(travelSpeed != 0) velocity -= velocity.getNormalized()*travelSpeed*travelSpeed*0.0005; 293 if(travelSpeed >= 120) velocity -= velocity.getNormalized()*travelSpeed*travelSpeed*0.0001; 294 else velocity -= velocity.getNormalized()*travelSpeed*0.001; 294 295 295 296 //other physics (gravity) 296 if((this->getAbsDirY()).y*travelSpeed < 60 && (this->getAbsDirY()).y>0)297 move += Vector(0,-1,0)* 120*time + Vector(0,2,0)*(this->getAbsDirY()).y*travelSpeed*time;298 if((this->getAbsDirY()).y*travelSpeed < 60 && (this->getAbsDirY()).y<0)299 move += Vector(0,-1,0)* 120*time - Vector(0,2,0)*(this->getAbsDirY()).y*travelSpeed*time;297 if((this->getAbsDirY()).y*travelSpeed < 120 && (this->getAbsDirY()).y>0) 298 move += Vector(0,-1,0)*60*time + Vector(0,1,0)*(this->getAbsDirY()).y*travelSpeed/2*time; 299 if((this->getAbsDirY()).y*travelSpeed < 120 && (this->getAbsDirY()).y<0) 300 move += Vector(0,-1,0)*60*time - Vector(0,1,0)*(this->getAbsDirY()).y*travelSpeed/2*time; 300 301 301 302 //hoover effect … … 337 338 //accel += (this->getAbsDirX())*2; 338 339 339 accel += (this->getAbsDirX())* 3*acceleration;340 accel += (this->getAbsDirX())*acceleration; 340 341 341 342 } … … 345 346 //this->shiftCoor((this->getAbsDirX())*-1); 346 347 //accel -= (this->getAbsDirX())*2; 347 accel -= (this->getAbsDirX())* 3*acceleration;348 accel -= (this->getAbsDirX())*0.5*acceleration; 348 349 } 349 350
Note: See TracChangeset
for help on using the changeset viewer.