Changeset 6232 in orxonox.OLD for branches/spaceshipcontrol/src/world_entities/space_ships
- Timestamp:
- Dec 21, 2005, 3:06:29 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/spaceshipcontrol/src/world_entities/space_ships/helicopter.cc
r6222 r6232 137 137 registerEvent(SDLK_q); 138 138 registerEvent(SDLK_e); 139 registerEvent(SDLK_c); 139 140 registerEvent(KeyMapper::PEV_FIRE1); 140 141 registerEvent(KeyMapper::PEV_NEXT_WEAPON); … … 266 267 if(velocity.len() != 0) velocity -= velocity*0.1; 267 268 269 //physics: Gravity 270 this->shiftCoor(Vector(0,-0.05,0)); 268 271 269 272 //hoover effect … … 300 303 //this->shiftCoor(this->getAbsDirX()); 301 304 302 accel += Vector(this->getAbsDirX().x,0,this->getAbsDirX().z).getNormalized()*2; 303 if((this->getAbsDirX()).y > -.2) 304 { 305 rot += Vector (0,0,1); 306 rotVal -= time/5; 307 } 305 accel += this->getAbsDirX()*2; 306 rot += Vector (0,0,1); 307 rotVal -= time/8; 308 308 } 309 309 else 310 310 { 311 if(this->getAbsDirX().y < -.02) this->shiftDir(Quaternion(time/ 5, Vector(0,0,1)));311 if(this->getAbsDirX().y < -.02) this->shiftDir(Quaternion(time/8, Vector(0,0,1))); 312 312 } 313 313 … … 315 315 { 316 316 //this->shiftCoor((this->getAbsDirX())*-1); 317 accel -= Vector(this->getAbsDirX().x,0,this->getAbsDirX().z).getNormalized()*2; 318 if((this->getAbsDirX()).y < .2) 319 { 320 rot += Vector (0,0,1); 321 rotVal += time/5; 322 } 317 accel -= this->getAbsDirX()*2; 318 rot += Vector (0,0,1); 319 rotVal += time/8; 323 320 } 324 321 else 325 322 { 326 if(this->getAbsDir Z().y > 0.02) this->shiftDir(Quaternion(-time/5, Vector(0,0,1)));323 if(this->getAbsDirX().y > 0.02) this->shiftDir(Quaternion(-time/8, Vector(0,0,1))); 327 324 } 328 325 … … 330 327 { 331 328 //this->shiftDir(Quaternion(time, Vector(0,1,0))); 332 accel -= Vector(this->getAbsDirZ().x,0,this->getAbsDirZ().z).getNormalized()*2; 333 //velocityDir.normalize(); 334 if((this->getAbsDirZ()).y < .2) 335 { 336 rot +=Vector(1,0,0); 337 rotVal -= time/5; 338 } 329 accel -= this->getAbsDirZ()*2; 330 //velocityDir.normalize(); 331 rot += Vector(1,0,0); 332 rotVal -= time/8; 339 333 } 340 334 else … … 346 340 { 347 341 //this->shiftDir(Quaternion(-time, Vector(0,1,0))); 348 349 accel += Vector(this->getAbsDirZ().x,0,this->getAbsDirZ().z).getNormalized()*2; 350 //velocityDir.normalize(); 351 if((this->getAbsDirZ()).y > -.2) 352 { 353 rot += Vector(1,0,0); 354 rotVal += time/5; 355 } 342 accel += this->getAbsDirZ()*2; 343 //velocityDir.normalize(); 344 rot += Vector(1,0,0); 345 rotVal += time/5; 356 346 } 357 347 else … … 381 371 //this->shiftDir(Quaternion(time, Vector(0,0,1))); 382 372 383 accel += (this->getAbsDirY())* 2;373 accel += (this->getAbsDirY())*3; 384 374 //velocityDir.normalize(); 385 375 //rot += Vector(0,0,1); … … 390 380 //this->shiftDir(Quaternion(-time, Vector(0,0,1))); 391 381 392 accel -= (this->getAbsDirY())* 2;382 accel -= (this->getAbsDirY())*3; 393 383 //velocityDir.normalize(); 394 384 //rot += Vector(0,0,1);
Note: See TracChangeset
for help on using the changeset viewer.