Changeset 6044 in orxonox.OLD for branches/spaceshipcontrol
- Timestamp:
- Dec 11, 2005, 2:07:27 PM (19 years ago)
- Location:
- branches/spaceshipcontrol
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/spaceshipcontrol/configure.ac
r5944 r6044 738 738 src/lib/physics/Makefile 739 739 src/lib/particles/Makefile 740 src/lib/parser/Makefile 741 src/lib/parser/tinyxml/Makefile 742 src/lib/parser/ini_parser/Makefile 740 743 src/lib/collision_detection/Makefile 741 744 src/lib/network/Makefile -
branches/spaceshipcontrol/src/world_entities/space_ships/space_ship.cc
r6034 r6044 117 117 bFire = false; 118 118 xMouse = yMouse = 0; 119 mouseSensitivity = 0.001; 120 airViscosity = 1.0; 121 119 mouseSensitivity = 0.005; 120 airViscosity = 0.1; 122 121 cycle = 0.0; 123 122 -
branches/spaceshipcontrol/src/world_entities/weapons/guided_missile.cc
r5994 r6044 49 49 this->energyMax = 10; 50 50 this->lifeSpan = 5.0; 51 this->agility = 5.0;51 this->agility = 0.1; 52 52 this->maxVelocity = 100; 53 53 … … 151 151 void GuidedMissile::tick (float time) 152 152 { 153 //Vector v = *this->flightDirection * ( this->speed * time * 1000 + 0.1); 153 154 154 if (target != NULL && target->getParent() != NullParent::getInstance()) 155 155 { 156 velocity += ((target->getAbsCoor() - this->getAbsCoor()).getNormalized())*agility;157 156 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; 160 163 161 164 this->setAbsDir(Quaternion(velocity, Vector(0,1,0)) * Quaternion ( -M_PI_2, Vector(0,1,0))); 162 165 } 166 163 167 Vector v = this->velocity * (time); 164 168 this->shiftCoor(v);
Note: See TracChangeset
for help on using the changeset viewer.