Changeset 4192 in orxonox.OLD for orxonox/branches/physics/src/story_entities
- Timestamp:
- May 16, 2005, 12:55:19 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/physics/src/story_entities/world.cc
r4190 r4192 492 492 493 493 494 // Creating a Test Particle System 494 495 ParticleSystem* system = new ParticleSystem(100000, PARTICLE_SPRITE); 495 system->setLifeSpan(3); 496 system->setConserve(.9); 497 system->setRadius(2, 0, 2, 0); 498 496 system->setLifeSpan(1); 497 system->setConserve(.8); 498 system->setRadius(4, 0, 1, 0); 499 system->setColor(1,0,0,1, 1,1,0,1, 0,0,0,0); 500 501 // Creating a Test Particle Emitter 499 502 ParticleEmitter* emitter = new ParticleEmitter(Vector(-1, 0, 0), M_PI_4, 400, .5); 500 503 emitter->setParent(this->localPlayer); 501 504 emitter->setRelCoor(Vector(0,-3,0)); 505 506 // Add the Flow from the Emitter into the System 507 particleEngine->addConnection(emitter, system); 508 509 510 // Creating Some Fields 502 511 Field* twirl = new Twirl(); 503 512 twirl->setMagnitude(.1); 504 513 Field* gravity = new PointGravity(); 505 514 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); 515 twirl->setParent(this->localCamera->getTarget()); 516 gravity->setParent(this->localCamera->getTarget()); 517 518 // new PhysicsConnection(system, twirl); 519 // new PhysicsConnection(system, gravity); 520 511 521 } 512 522
Note: See TracChangeset
for help on using the changeset viewer.