Changeset 10001 in orxonox.OLD for branches/playability/src/world_entities/projectiles/hbolt.cc
- Timestamp:
- Dec 3, 2006, 8:02:30 PM (18 years ago)
- Location:
- branches/playability
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/playability
- Property svn:ignore
-
old new 10 10 autom4te.cache 11 11 aclocal.m4 12 tags 13 test.bmp 14 config.sub 15 config.guess 16 OrxonoxPlayability.kdevses 17 OrxonoxPlayability.kdevelop.pcs
-
- Property svn:ignore
-
branches/playability/src/world_entities/projectiles/hbolt.cc
r9998 r10001 46 46 47 47 this->angle = 0; 48 this->rotationSpeed = 3; 48 this->rotationSpeed = .3; 49 this->axis = Vector (0, 0, -1); 49 50 50 51 this->emitter = new DotEmitter(100, 5, M_2_PI); … … 116 117 117 118 118 void HBolt::updateAngle ( )119 void HBolt::updateAngle (float time) 119 120 { 120 this->angle = this->angle + this->rotationSpeed ;121 this->angle = this->angle + this->rotationSpeed * time / 1000; 121 122 } 122 123 … … 135 136 this->deactivate(); 136 137 137 this->updateAngle(); 138 //float w = this->rotationSpeed * M_PI; 139 Quaternion rotation(this->rotationSpeed * dt, this->axis); 140 Quaternion u = this->getRelDir(); 141 this->setRelDir(u * rotation); 142 143 this->updateAngle(dt); 138 144 139 145 } … … 172 178 glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z); 173 179 glRotatef(this->angle, 0.0, 0.0, -1.0); 174 //this->getModel()->draw();175 WorldEntity::draw();180 this->getModel()->draw(); 181 //WorldEntity::draw(); 176 182 glPopMatrix(); 177 183 glPopAttrib();
Note: See TracChangeset
for help on using the changeset viewer.