Changeset 5886 in orxonox.OLD for branches/spaceshipcontrol/src/story_entities
- Timestamp:
- Dec 3, 2005, 2:54:27 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/spaceshipcontrol/src/story_entities/world.cc
r5881 r5886 362 362 // Create a Player 363 363 this->localPlayer = new Player(); 364 Playable* playable; 364 365 list<BaseObject*>* playableList = ClassList::getList(CL_PLAYABLE); 365 366 if (playableList != NULL) 366 367 { 367 Playable*playable = dynamic_cast<Playable*>(playableList->front());368 playable = dynamic_cast<Playable*>(playableList->front()); 368 369 if (playable != NULL) 369 370 this->localPlayer->setControllable(playable); … … 381 382 382 383 // bind camera 383 //this->localCamera->bind (localPlayer); 384 // this->localPlayer->addChild (this->localCamera); 384 playable->addChild (this->localCamera); 385 385 386 386 387 387 // TrackManager::getInstance()->setBindSlave(env); 388 //PNode* tn = TrackManager::getInstance()->getTrackNode();389 // tn->addChild(this->localPlayer);390 391 //localCamera->setParent(TrackNode::getInstance());388 PNode* tn = TrackManager::getInstance()->getTrackNode(); 389 tn->addChild(playable); 390 391 // //localCamera->setParent(TrackNode::getInstance()); 392 392 // tn->addChild(this->localCamera); 393 //localCamera->lookAt(tn);394 localCamera->setClipRegion(1, 1000 0.0);393 localCamera->lookAt(tn); 394 localCamera->setClipRegion(1, 1000.0); 395 395 // this->localPlayer->setParentMode(PNODE_ALL); 396 396 TrackManager::getInstance()->condition(1, LEFTRIGHT, this->localPlayer);
Note: See TracChangeset
for help on using the changeset viewer.