Changeset 4464 in orxonox.OLD for orxonox/trunk/src/world_entities/projectile.cc
- Timestamp:
- Jun 2, 2005, 1:18:44 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/world_entities/projectile.cc
r4322 r4464 93 93 } 94 94 95 96 /** 97 \brief sets the velocity vector to a spec speed 98 \param velocity: vector of the velocity 99 */ 100 void Projectile::setVelocity(const Vector &velocity) 101 { 102 this->offsetVel = this->velocity = velocity; 103 this->offsetVel.normalize(); 104 this->velocity += (this->offsetVel * 50.0); 105 } 106 107 95 108 /** 96 109 \brief signal tick, time dependent things will be handled here … … 99 112 void Projectile::tick (float time) 100 113 { 101 Vector v = *this->flightDirection * ( this->speed * time * 1000 + 0.7);114 Vector v = this->velocity * (time); 102 115 this->shiftCoor(v); 103 116
Note: See TracChangeset
for help on using the changeset viewer.