Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3586 in orxonox.OLD for orxonox/trunk/src/story_entities


Ignore:
Timestamp:
Mar 17, 2005, 2:15:33 AM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: fixed movement bug (was in the lists), modified the player

File:
1 edited

Legend:

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

    r3573 r3586  
    181181
    182182            //create helper for player
    183             HelperParent* hp = new HelperParent ();
     183            //HelperParent* hp = new HelperParent ();
    184184            /* the player has to be added to this helper */
    185185
    186186            // create a player
    187             WorldEntity* myPlayer = new Player ();
    188             myPlayer->setName ("player");
    189             this->spawn (myPlayer);
    190             this->localPlayer = myPlayer;
     187            this->localPlayer = new Player ();
     188            this->localPlayer->setName ("player");
     189            this->spawn (this->localPlayer);
    191190            /*monitor progress*/
    192191            this->glmis->step();           
     
    194193            // bind input
    195194            Orxonox *orx = Orxonox::getInstance ();
    196             orx->getLocalInput()->bind (myPlayer);
     195            orx->getLocalInput()->bind (this->localPlayer);
    197196           
    198197            // bind camera
    199198            this->localCamera = new Camera(this);
    200199            this->localCamera->setName ("camera");
    201             this->localCamera->bind (myPlayer);
     200            this->localCamera->bind (this->localPlayer);
    202201            /*monitor progress*/
    203202            this->glmis->step();           
     
    217216            this->spawn(env);
    218217
    219             /*
    220             Vector* es = new Vector (50, 2, 0);
    221             Quaternion* qs = new Quaternion ();
    222             WorldEntity* pr = new Primitive(PSPHERE);
    223             pr->setName("primitive");
    224             this->spawn(pr, this->localPlayer, es, qs, ROTATION);
    225             */
    226 
     218           
     219            //Vector* es = new Vector (10, 5, 0);
     220            //Quaternion* qs = new Quaternion ();
     221            //WorldEntity* pr = new Primitive(PSPHERE);
     222            //pr->setName("primitive");
     223            //this->spawn(pr, this->localPlayer, es, qs, PNODE_ROTATE_AND_MOVE);
     224           
    227225
    228226            /*monitor progress*/
     
    231229            //      trackManager->setBindSlave(env);
    232230            PNode* tn = trackManager->getTrackNode();
    233             tn->addChild(myPlayer);
     231            tn->addChild(this->localPlayer);
    234232
    235233            //localCamera->setParent(TrackNode::getInstance());
    236234            tn->addChild (this->localCamera);
    237             myPlayer->setMode(PNODE_ROTATE_AND_MOVE);
     235            this->localPlayer->setMode(PNODE_ROTATE_AND_MOVE);
    238236            //Vector* cameraOffset = new Vector (0, 5, -10);
    239237            Vector* cameraOffset = new Vector (-10, 5, 0);
    240238            this->localCamera->setRelCoor (cameraOffset);
    241             trackManager->condition(2, NEAREST, myPlayer);
     239            trackManager->condition(2, NEAREST, this->localPlayer);
    242240
    243241            break;
     
    267265            skySphere = new Skysphere("../data/pictures/sky-replace.jpg");
    268266            this->localPlayer->addChild(this->skySphere);
     267
     268            Vector* es = new Vector (20, 0, 0);
     269            Quaternion* qs = new Quaternion ();
     270            WorldEntity* pr = new Primitive(PSPHERE);
     271            pr->setName("primitive");
     272            this->spawn(pr, this->localPlayer, es, qs, PNODE_ROTATE_AND_MOVE);
    269273
    270274            break;
     
    721725      entity->setRelCoor (relCoor);
    722726      entity->setRelDir (relDir);
     727      entity->setMode(parentingMode);
    723728     
    724729      this->entities->add (entity);
Note: See TracChangeset for help on using the changeset viewer.