Changeset 6159 in orxonox.OLD for branches/spaceshipcontrol/src/world_entities
- Timestamp:
- Dec 18, 2005, 3:17:29 PM (19 years ago)
- Location:
- branches/spaceshipcontrol/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/spaceshipcontrol/src/world_entities/space_ships/helicopter.cc
r6092 r6159 247 247 // this is the air friction (necessary for a smooth control) 248 248 if(velocity.len() != 0) velocity -= velocity*0.1; 249 249 250 250 251 251 //hoover effect … … 281 281 { 282 282 //this->shiftCoor(this->getAbsDirX()); 283 283 284 accel += Vector(this->getAbsDirX().x,0,this->getAbsDirX().z).getNormalized()*2; 284 285 if((this->getAbsDirX()).y > -.2) -
branches/spaceshipcontrol/src/world_entities/weapons/guided_missile.cc
r6133 r6159 150 150 */ 151 151 void GuidedMissile::tick (float time) 152 { 153 154 152 { 155 153 156 154 if (target != NULL && target->getParent() != NullParent::getInstance()) … … 160 158 correctionVector = ( diffVector * (speed * speed/( velocity.dot(diffVector ) ) )); 161 159 162 if (velocity.dot(diffVector) != 0)163 164 160 if(velocity.dot(diffVector) > 0) 165 161 velocity += (( correctionVector - velocity).getNormalized()) * agility; 162 else if (velocity.dot(diffVector) < 0) 163 velocity -= ( ( correctionVector - velocity).getNormalized()) * agility; 166 164 else 167 velocity -= ( ( correctionVector - velocity).getNormalized()) * agility; 168 169 else 170 velocity += diffVector * agility; 165 velocity += diffVector * agility; 171 166 172 167 this->setAbsDir(Quaternion(velocity, Vector(0,1,0)) * Quaternion ( -M_PI_2, Vector(0,1,0)));
Note: See TracChangeset
for help on using the changeset viewer.