Changeset 7001 in orxonox.OLD for trunk/src/world_entities/space_ships/turbine_hover.cc
- Timestamp:
- Feb 3, 2006, 2:18:26 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/space_ships/turbine_hover.cc
r7000 r7001 30 30 31 31 #include "graphics_engine.h" 32 #include "dot_emitter.h" 33 #include "sprite_particles.h" 32 34 33 35 using namespace std; … … 112 114 this->cameraLook = 0.0f; 113 115 this->rotation = 0.0f; 114 this->acceleration = 25.0f;115 this->airFriction = 3.0f;116 this->acceleration = 10.0f; 117 this->airFriction = 2.0f; 116 118 117 119 // camera - issue … … 138 140 this->rotorNodeRight.setRelCoor(0, 1.0, 2.3); 139 141 140 dynamic_cast<Element2D*>(this->getWeaponManager()->getFixedTarget())->setVisibility( false); 142 // PARTICLES 143 this->burstEmitter[0] = new DotEmitter(200, 5.0, .01); 144 this->burstEmitter[0]->setParent(&this->rotorNodeLeft); 145 this->burstEmitter[0]->setRelCoor(0, -0.7, 0); 146 this->burstEmitter[0]->setRelDir(Quaternion(-M_PI_2, Vector(0,0,1))); 147 this->burstEmitter[0]->setName("TurbineHover_Burst_emitter_Left"); 148 149 this->burstEmitter[1] = new DotEmitter(200, 5.0, .01); 150 this->burstEmitter[1]->setParent(&this->rotorNodeRight); 151 this->burstEmitter[1]->setRelCoor(0, -0.7, 0); 152 this->burstEmitter[1]->setRelDir(Quaternion(-M_PI_2, Vector(0,0,1))); 153 this->burstEmitter[1]->setName("TurbineHover_Burst_emitter_Right"); 154 155 156 this->burstSystem = new SpriteParticles(1000); 157 this->burstSystem->addEmitter(this->burstEmitter[0]); 158 this->burstSystem->addEmitter(this->burstEmitter[1]); 159 this->burstSystem->setName("SpaceShip_Burst_System"); 160 ((SpriteParticles*)this->burstSystem)->setMaterialTexture("maps/radial-trans-noise.png"); 161 this->burstSystem->setLifeSpan(1.0, .3); 162 this->burstSystem->setRadius(0.0, 1.5); 163 this->burstSystem->setRadius(0.05, 1.8); 164 this->burstSystem->setRadius(.5, .8); 165 this->burstSystem->setRadius(1.0, 0); 166 this->burstSystem->setColor(0.0, .7,.7,1,.5); 167 this->burstSystem->setColor(0.2, 0,0,0.8,.5); 168 this->burstSystem->setColor(0.5, .5,.5,.8,.3); 169 this->burstSystem->setColor(1.0, .8,.8,.8,.0); 141 170 142 171 … … 153 182 registerEvent(EV_MOUSE_MOTION); 154 183 184 dynamic_cast<Element2D*>(this->getWeaponManager()->getFixedTarget())->setVisibility( false); 155 185 156 186 // WEAPON_MANAGER configuration … … 241 271 this->movement(dt); 242 272 this->rotorCycle += this->rotorSpeed * dt; 273 274 // TRYING TO FIX PNode. 275 /* this->cameraNode.setAbsCoorSoft(this->getAbsCoor() + Vector(0,5,0), 30); 276 this->cameraNode.setAbsDirSoft(this->getAbsDir(), 30);*/ 243 277 } 244 278 … … 293 327 this->setRelDirSoft(this->direction * Quaternion(-cameraLook, Vector(0,0,1)), 5); 294 328 295 this->wingNodeLeft.setRelDirSoft(Quaternion(accel.z * .0 3+this->rotation, Vector(1,0,0)), 5);296 this->rotorNodeLeft.setRelDirSoft(Quaternion(-accel.x * .0 5+this->rotation + cameraLook, Vector(0,0,1)), 5);297 298 this->wingNodeRight.setRelDirSoft(Quaternion(accel.z * .0 3+this->rotation, Vector(1,0,0)), 5);299 this->rotorNodeRight.setRelDirSoft(Quaternion(-accel.x*.0 5-this->rotation + cameraLook, Vector(0,0,1)), 5);329 this->wingNodeLeft.setRelDirSoft(Quaternion(accel.z * .05 +this->rotation, Vector(1,0,0)), 5); 330 this->rotorNodeLeft.setRelDirSoft(Quaternion(-accel.x * .07+this->rotation + cameraLook, Vector(0,0,1)), 5); 331 332 this->wingNodeRight.setRelDirSoft(Quaternion(accel.z * .05 +this->rotation, Vector(1,0,0)), 5); 333 this->rotorNodeRight.setRelDirSoft(Quaternion(-accel.x*.07 -this->rotation + cameraLook, Vector(0,0,1)), 5); 300 334 } 301 335
Note: See TracChangeset
for help on using the changeset viewer.