Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
May 15, 2005, 11:20:53 PM (20 years ago)
Author:
bensch
Message:

orxonox/branches/physics: particles get rendered with facing toward Camera (in PARTICLE_SPRITE-mode)

Location:
orxonox/branches/physics/src/story_entities
Files:
2 edited

Legend:

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

    r4186 r4190  
    492492
    493493
    494   ParticleSystem* system = new ParticleSystem(10000, PARTICLE_SPARK);
    495   system->setLifeSpan(5);
     494  ParticleSystem* system = new ParticleSystem(100000, PARTICLE_SPRITE);
     495  system->setLifeSpan(3);
    496496  system->setConserve(.9);
    497497  system->setRadius(2, 0, 2, 0);
    498498
    499   ParticleEmitter* emitter = new ParticleEmitter(Vector(-1, 0, 0), M_PI_4, 1000, 0);
     499  ParticleEmitter* emitter = new ParticleEmitter(Vector(-1, 0, 0), M_PI_4, 400, .5);
    500500  emitter->setParent(this->localPlayer);
    501501 
    502502  Field* twirl = new Twirl();
    503   twirl->setMagnitude(-.1);
     503  twirl->setMagnitude(.1);
    504504  Field* gravity = new PointGravity();
    505   gravity->setMagnitude(0);
    506   new PhysicsConnection(system, twirl);
    507   //  new PhysicsConnection(system, gravity);
    508   twirl->setParent(this->localCamera->getTarget());
    509   gravity->setParent(this->localCamera->getTarget());
    510   particleEngine->addConnection(emitter, system);
     505  gravity->setMagnitude(.5);
     506    new PhysicsConnection(system, twirl);
     507    //    new PhysicsConnection(system, gravity);
     508    twirl->setParent(this->localCamera->getTarget());
     509    gravity->setParent(this->localCamera->getTarget());
     510    particleEngine->addConnection(emitter, system);
    511511}
    512512
  • orxonox/branches/physics/src/story_entities/world.h

    r4178 r4190  
    3636  static WorldInterface* getInstance();
    3737  void init(World* world);
     38  inline World* getCurrentWorld(void) {return this->worldReference;}
    3839  tList<WorldEntity>* getEntityList();
    3940
     
    9091  void setPath( const char* name);
    9192
     93  inline Camera* getLocalCamera(void) {return this->localCamera;}
     94
    9295 private:
    9396  void constuctorInit(char* name, int worldID);
Note: See TracChangeset for help on using the changeset viewer.