Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 1, 2008, 6:09:54 PM (17 years ago)
Author:
scheusso
Message:

merged camera branch changes from 1101 to 1202 into network branch (we have now a camera manager)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network3/src/orxonox/objects/SpaceShip.cc

    r1184 r1212  
    2323 *      Fabian 'x3n' Landau
    2424 *   Co-authors:
    25  *      ...
     25 *      Benjamin Knecht
    2626 *
    2727 */
     
    3838#include <OgreSceneNode.h>
    3939
     40#include "CameraHandler.h"
    4041#include "util/tinyxml/tinyxml.h"
    4142#include "util/Convert.h"
     
    287288   
    288289    void SpaceShip::createCamera(){
    289       Ogre::Camera *cam = GraphicsEngine::getSingleton().getSceneManager()->createCamera("ShipCam");
    290290      this->camNode_ = this->getNode()->createChildSceneNode("CamNode");
     291      camNode_->setPosition(this->getNode()->getPosition() + Vector3(-50,0,10));
    291292/*
    292293//        node->setInheritOrientation(false);
     
    295296      cam->roll(Degree(0));
    296297*/
    297 
    298       cam->setPosition(Vector3(-200,0,35));
     298      cam_ = new Camera(this->camNode_);
     299      cam_->setTargetNode(this->getNode());
     300      CameraHandler::getInstance()->requestFocus(cam_);
    299301//        cam->setPosition(Vector3(0,-350,0));
    300       cam->lookAt(Vector3(0,0,35));
    301       cam->roll(Degree(-90));
    302 
    303       this->camNode_->attachObject(cam);
    304       GraphicsEngine::getSingleton().getRenderWindow()->addViewport(cam);
     302      //cam->roll(Degree(-90));
     303
     304      //this->camNode_->attachObject(cam);
    305305     
    306306    }
Note: See TracChangeset for help on using the changeset viewer.