Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6044 in orxonox.OLD for branches/spaceshipcontrol


Ignore:
Timestamp:
Dec 11, 2005, 2:07:27 PM (19 years ago)
Author:
snellen
Message:

WARNING: probably doesnt compile

Location:
branches/spaceshipcontrol
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/spaceshipcontrol/configure.ac

    r5944 r6044  
    738738                 src/lib/physics/Makefile
    739739                 src/lib/particles/Makefile
     740                 src/lib/parser/Makefile
     741                 src/lib/parser/tinyxml/Makefile
     742                 src/lib/parser/ini_parser/Makefile
    740743                 src/lib/collision_detection/Makefile
    741744                 src/lib/network/Makefile
  • branches/spaceshipcontrol/src/world_entities/space_ships/space_ship.cc

    r6034 r6044  
    117117  bFire = false;
    118118  xMouse = yMouse = 0;
    119   mouseSensitivity = 0.001;
    120   airViscosity = 1.0;
    121 
     119  mouseSensitivity = 0.005;
     120  airViscosity = 0.1;
    122121  cycle = 0.0;
    123122
  • branches/spaceshipcontrol/src/world_entities/weapons/guided_missile.cc

    r5994 r6044  
    4949  this->energyMax = 10;
    5050  this->lifeSpan = 5.0;
    51   this->agility = 5.0;
     51  this->agility = 0.1;
    5252  this->maxVelocity = 100;
    5353
     
    151151void GuidedMissile::tick (float time)
    152152{
    153   //Vector v = *this->flightDirection * ( this->speed * time * 1000 + 0.1);
     153
    154154  if (target != NULL && target->getParent() != NullParent::getInstance())
    155155   {
    156      velocity += ((target->getAbsCoor() - this->getAbsCoor()).getNormalized())*agility;
    157156     float speed = velocity.len();
    158      if (speed > this->maxVelocity)
    159        velocity *= maxVelocity/speed;
     157
     158     velocity += (((target->getAbsCoor() - this->getAbsCoor()).getNormalized())*speed - velocity)*agility;
     159     velocity *= (velocity.getNormalized())*speed;
     160
     161
     162     velocity *= maxVelocity/speed;
    160163
    161164     this->setAbsDir(Quaternion(velocity, Vector(0,1,0)) * Quaternion ( -M_PI_2, Vector(0,1,0)));
    162165   }
     166
    163167  Vector v = this->velocity * (time);
    164168  this->shiftCoor(v);
Note: See TracChangeset for help on using the changeset viewer.