Changeset 4966 in orxonox.OLD for orxonox/trunk/src/world_entities
- Timestamp:
- Jul 28, 2005, 5:53:15 PM (19 years ago)
- Location:
- orxonox/trunk/src/world_entities/weapons
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/world_entities/weapons/test_gun.cc
r4959 r4966 160 160 Projectile* pj = dynamic_cast<Projectile*>(this->getProjectileFactory()->resurrect()); 161 161 162 /* 162 163 PNode* target = this->getWeaponManager()->getFixedTarget(); 163 164 164 if (target != NULL) 165 165 { 166 166 pj->setVelocity(this->getVelocity()+(target->getAbsCoor() - this->getAbsCoor())*.5);//this->getVelocity()); 167 167 } 168 else 169 pj->setVelocity(target->getVelocity()); 170 168 else*/ 169 pj->setVelocity(this->getVelocity() + this->getAbsDir().apply(Vector(1,0,0))*20); 171 170 172 171 pj->setAbsCoor(this->getEmissionPoint()); -
orxonox/trunk/src/world_entities/weapons/turret.cc
r4965 r4966 93 93 Vector direction = this->getWeaponManager()->getFixedTarget()->getAbsCoor() - this->getAbsCoor(); 94 94 direction.normalize(); 95 Quaternion quat = Quaternion(direction, Vector(0,1,0)) * Quaternion ( -M_PI_2, Vector(0,1,0)) ;95 Quaternion quat = Quaternion(direction, this->getParent()->getAbsDir().apply(Vector(0,1,0))) * Quaternion ( -M_PI_2, Vector(0,1,0)) ; 96 96 97 97 this->setAbsDir(quat);
Note: See TracChangeset
for help on using the changeset viewer.