- Timestamp:
- May 24, 2009, 11:53:09 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickups2/src/orxonox/objects/pickup/PickupSpawner.cc
r2917 r3046 44 44 namespace orxonox 45 45 { 46 const float PickupSpawner::bounceSpeed_s = 6.0f; 47 const float PickupSpawner::rotationSpeed_s = 1.0f; 48 const float PickupSpawner::bounceDistance_s = 4.0f; 49 46 50 CreateFactory(PickupSpawner); 47 51 … … 57 61 this->triggerDistance_ = 20; 58 62 this->respawnTime_ = 0.0f; 63 this->tickSum_ = 0.0f; 59 64 } 60 65 //! Deconstructor. … … 108 113 this->trigger(*it); 109 114 } 115 this->yaw(Radian(rotationSpeed_s*dt)); 116 this->tickSum_ += bounceSpeed_s*dt; 117 this->translate(Vector3(0,bounceDistance_s*dt*sin(this->tickSum_),0)); 118 if (this->tickSum_ > 2*Ogre::Math::PI) 119 this->tickSum_ -= 2*Ogre::Math::PI; 110 120 } 111 121 }
Note: See TracChangeset
for help on using the changeset viewer.