Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4396 in orxonox.OLD for orxonox/trunk/src/story_entities/world.cc


Ignore:
Timestamp:
May 30, 2005, 3:27:36 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: now Objects should be affected by the PhysicsEngine too

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/story_entities/world.cc

    r4382 r4396  
    4848#include "graphics_engine.h"
    4949#include "physics_engine.h"
     50#include "fields.h"
    5051
    5152#include "command_node.h"
     
    181182  TextEngine::getInstance()->flush();
    182183  delete AnimationPlayer::getInstance(); // this should be at the end of the unloading sequence.
     184  delete PhysicsEngine::getInstance();
    183185  //delete garbagecollecor
    184186  //delete animator
     
    473475  emitter->setParent(this->localPlayer);
    474476  emitter->setRelCoor(Vector(-3,0,0));
     477
     478  Field* gravity = new Gravity();
     479  gravity->setMagnitude(1000);
     480  //  gravity->setParent(this->localCamera->getTarget());
    475481 
    476482  // Add the Flow from the Emitter into the System
    477483  particleEngine->addConnection(emitter, system);
    478484
     485  new PhysicsConnection(system, gravity);
     486    new PhysicsConnection(this->localPlayer, gravity);
     487 
    479488
    480489  WorldEntity* testEntity = new TestEntity();
     
    10021011      AnimationPlayer::getInstance()->tick(this->dtS);
    10031012
     1013      PhysicsEngine::getInstance()->tick(this->dtS);
     1014
     1015
    10041016      particleEngine->tick(this->dtS);
    10051017      this->garbageCollector->tick(this->dtS);
Note: See TracChangeset for help on using the changeset viewer.