Changeset 3632 in orxonox.OLD for orxonox/trunk/src/world_entities/projectile.cc
- Timestamp:
- Mar 22, 2005, 12:36:39 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/world_entities/projectile.cc
r3631 r3632 34 34 //this->model = new OBJModel(""); 35 35 this->projectileModel = new Primitive(P_SPHERE); 36 this->flightDirection = NULL; 37 this->speed = 1.0f; 36 38 } 37 39 … … 51 53 52 54 /** 55 \brief this sets the flight direction of the projectile 56 \param directin in which to flight 57 58 this function will calculate a vector out of this to be used in the 59 tick function 60 */ 61 void Projectile::setFlightDirection(Quaternion* flightDirection) 62 { 63 if( this->flightDirection == NULL) 64 this->flightDirection = new Vector(); 65 Vector v(1, 0, 0); 66 *this->flightDirection = flightDirection->apply(v); 67 } 68 69 70 /** 53 71 \brief signal tick, time dependent things will be handled here 54 72 \param time since last tick 55 73 */ 56 74 void Projectile::tick (float time) 57 {} 75 { 76 *this->flightDirection = *this->flightDirection * speed; 77 this->shiftCoor(this->flightDirection); 78 } 58 79 59 80 /**
Note: See TracChangeset
for help on using the changeset viewer.