Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10532 in orxonox.OLD for trunk/src/world_entities/particles


Ignore:
Timestamp:
Jan 31, 2007, 1:45:04 AM (18 years ago)
Author:
stefalie
Message:

spriteparticles-cam-bug fixxed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/particles/sprite_particles.cc

    r10510 r10532  
    2323#include "state.h"
    2424#include "shell_command.h"
     25#include "camera.h"
     26#include "cameraman.h"
    2527
    2628
     
    134136    //! @todo implement a faster code for the look-at Camera algorithm.
    135137
    136     const PNode* camera = State::getCameraNode();  //!< @todo MUST be different
     138//     const PNode* camera = State::getCameraNode();  //!< @todo MUST be different
     139//     Vector cameraPos = camera->getAbsCoor();
     140//     Vector cameraTargetPos = State::getCameraTargetNode()->getAbsCoor();
     141//     Vector view = cameraTargetPos - cameraPos;
     142
     143    const CameraMan* man = State::getCameraman();
     144    const Camera* camera = man->getCurrentCam(); //!< @todo MUST be different
    137145    Vector cameraPos = camera->getAbsCoor();
    138     Vector cameraTargetPos = State::getCameraTargetNode()->getAbsCoor();
     146    Vector cameraTargetPos = camera->getTarget()->getAbsCoor();
    139147    Vector view = cameraTargetPos - cameraPos;
     148
    140149    Vector up = Vector(0, 1, 0);
    141150    up = camera->getAbsDir().apply(up);
Note: See TracChangeset for help on using the changeset viewer.