Changeset 9969 in orxonox.OLD for branches/playability/src/world_entities/projectiles
- Timestamp:
- Nov 29, 2006, 3:27:00 PM (18 years ago)
- Location:
- branches/playability/src/world_entities/projectiles
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/playability/src/world_entities/projectiles/projectile.cc
r9964 r9969 192 192 void Projectile::tick (float dt) 193 193 { 194 Vector estTargetDir = this->targetPosition + this->targetVelocity * this->eta;195 //Vector estTargetDir = (this->target.getRelCoor() + this->target.getVelocity()) / this->velocity.len();194 float tti; //!< time to impact 195 Vector estTargetDir = (this->target->getRelCoor() + this->target->getVelocity()); 196 196 this->velocity = this->newDirection(this->velocity, estTargetDir, this->turningSpeed * dt ) * this->velocity.len(); 197 197 Vector v = this->velocity * (dt); -
branches/playability/src/world_entities/projectiles/projectile.h
r9964 r9969 79 79 80 80 PNode* target; //!< A target for guided Weapons. 81 Vector targetPosition; //!< current target position relative to projectile82 Vector targetVelocity; //!< current target speed and direction83 float eta; //!< estimated time of arrival == time to kaboom!81 //Vector targetPosition; //!< current target position relative to projectile 82 //Vector targetVelocity; //!< current target speed and direction 83 //float eta; //!< estimated time of arrival == time to kaboom! 84 84 85 85 OrxSound::SoundSource soundSource;
Note: See TracChangeset
for help on using the changeset viewer.