- Timestamp:
- Mar 23, 2005, 11:20:29 AM (20 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/camera.cc
r3642 r3643 104 104 case VIEW_NORMAL: 105 105 this->toFovy = 60.0; 106 this->toRelCoor = Vector 106 this->toRelCoor = Vector(-10, 5, 0); 107 107 break; 108 108 case VIEW_BEHIND: 109 this->toFovy = 90.0;110 this->toRelCoor = Vector (-6, 2, 0);109 this->toFovy = 120.0; 110 this->toRelCoor = Vector(-7, 0, 0); 111 111 break; 112 112 case VIEW_FRONT: 113 113 this->toFovy = 95.0; 114 this->toRelCoor = Vector (10, 5, 0);114 this->toRelCoor = Vector(12, 5, 0); 115 115 break; 116 116 case VIEW_LEFT: 117 117 this->toFovy = 90; 118 this->toRelCoor = Vector 118 this->toRelCoor = Vector(0, 2, -10); 119 119 break; 120 120 case VIEW_RIGHT: 121 121 this->toFovy = 90; 122 this->toRelCoor = Vector 122 this->toRelCoor = Vector(0, 2, 10); 123 123 break; 124 case VIEW_TOP: 125 this->toFovy= 120; 126 this->toRelCoor = Vector(0, 4, 0); 124 127 } 125 128 } … … 132 135 void Camera::tick(float dt) 133 136 { 134 dt /= 1000;137 dt /= 500; 135 138 this->fovy += (this->toFovy - this->fovy) * dt; 136 139 Vector tmp = this->getRelCoor() + (this->toRelCoor - this->getRelCoor()) * dt; -
orxonox/trunk/src/camera.h
r3641 r3643 13 13 class CameraTarget; 14 14 15 enum ViewMode{VIEW_NORMAL, VIEW_BEHIND, VIEW_FRONT, VIEW_LEFT, VIEW_RIGHT };15 enum ViewMode{VIEW_NORMAL, VIEW_BEHIND, VIEW_FRONT, VIEW_LEFT, VIEW_RIGHT, VIEW_TOP}; 16 16 17 17 //! Camera -
orxonox/trunk/src/orxonox.conf
r3640 r3643 18 18 4=view3 19 19 5=view4 20 5=view5 -
orxonox/trunk/src/story_entities/world.cc
r3641 r3643 305 305 this->localCamera->setName ("camera"); 306 306 this->localCamera->lookAt(this->localPlayer); 307 Vector* cameraOffset = new Vector (-2, 2, 0); 308 this->localCamera->setRelCoor (cameraOffset); 307 this->localCamera->setParent(this->localPlayer); 309 308 310 309 /*monitor progress*/ … … 341 340 342 341 //localCamera->setParent(TrackNode::getInstance()); 343 tn->addChild (this->localCamera); 342 tn->addChild(this->localCamera); 343 // localCamera->lookAt(tn); 344 344 this->localPlayer->setMode(PNODE_ALL); 345 345 //Vector* cameraOffset = new Vector (0, 5, -10); … … 858 858 else if( !strcmp( cmd->cmd, "view3")) this->localCamera->setViewMode(VIEW_LEFT); 859 859 else if( !strcmp( cmd->cmd, "view4")) this->localCamera->setViewMode(VIEW_RIGHT); 860 else if( !strcmp( cmd->cmd, "view5")) this->localCamera->setViewMode(VIEW_TOP); 860 861 861 862 return false;
Note: See TracChangeset
for help on using the changeset viewer.