Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4184 in orxonox.OLD for orxonox/branches/physics/src/story_entities


Ignore:
Timestamp:
May 14, 2005, 10:27:47 PM (20 years ago)
Author:
bensch
Message:

orxonox/branches/physics: new forces added

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/physics/src/story_entities/world.cc

    r4183 r4184  
    492492
    493493
    494   ParticleSystem* system = new ParticleSystem(1000, PARTICLE_SPRITE);
    495   system->setLifeSpan(.5);
    496   system->setConserve(.99);
     494  ParticleSystem* system = new ParticleSystem(100000, PARTICLE_SPARK);
     495  system->setLifeSpan(5);
     496  system->setConserve(.9);
    497497  system->setRadius(2, 0, 2, 0);
    498498
    499   ParticleEmitter* emitter = new ParticleEmitter(Vector(-1, 0, 0), M_PI_4, 100, .05);
     499  ParticleEmitter* emitter = new ParticleEmitter(Vector(-1, 0, 0), M_PI_2, 5000, 1);
    500500  emitter->setParent(this->localPlayer);
    501501 
    502   Gravity* gravity = new Gravity();
    503   gravity->setMagnitude(0.001);
     502  Field* twirl = new Twirl();
     503  twirl->setMagnitude(.0001);
     504  Field* gravity = new PointGravity();
     505  gravity->setMagnitude(0.0001);
     506  new PhysicsConnection(system, twirl);
    504507  new PhysicsConnection(system, gravity);
    505 
     508  twirl->setParent(this->localPlayer);
     509  gravity->setParent(this->localCamera->getTarget());
    506510  particleEngine->addConnection(emitter, system);
    507511}
Note: See TracChangeset for help on using the changeset viewer.