Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5004 in orxonox.OLD


Ignore:
Timestamp:
Aug 13, 2005, 10:44:50 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: cooler movement

Location:
orxonox/trunk/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/math/vector.cc

    r5000 r5004  
    7575   in mind that if you do that, the model's front has to point in +z direction, and left
    7676   and right should be -x or +x respectively or the mesh wont rotate correctly.
     77 *
     78 * @TODO !!!OPTIMIZE THIS!!!
    7779*/
    7880Quaternion::Quaternion (const Vector& dir, const Vector& up)
    7981{
    80   Vector z = dir;
    81   z.normalize();
    82   Vector x = up.cross(z);
    83   x.normalize();
     82  Vector z = dir.getNormalized();
     83  Vector x = up.cross(z).getNormalized();
    8484  Vector y = z.cross(x);
    8585
  • orxonox/trunk/src/story_entities/world.cc

    r4986 r5004  
    377377  tn->addChild(this->localCamera);
    378378  localCamera->lookAt(tn);
    379   localCamera->setParentMode(PNODE_MOVEMENT);
    380379  localCamera->setClipRegion(1, 10000.0);
    381380  this->localPlayer->setParentMode(PNODE_ALL);
  • orxonox/trunk/src/world_entities/camera.cc

    r5000 r5004  
    5252  this->setViewMode(VIEW_NORMAL);
    5353
    54   //this->setParentMode(PNODE_MOVEMENT);
     54  this->setParentMode(PNODE_ALL);
    5555}
    5656
     
    261261}
    262262
    263 CameraTarget::~CameraTarget()
    264 {
    265 
    266 }
  • orxonox/trunk/src/world_entities/camera.h

    r4987 r5004  
    6969
    7070 public:
    71   virtual ~CameraTarget();
    7271};
    7372
  • orxonox/trunk/src/world_entities/player.cc

    r5003 r5004  
    121121void Player::init()
    122122{
    123   this->setAbsDir(Quaternion(.5, Vector(1,0,0)));
    124 
     123//  this->setAbsDir(Quaternion(M_PI, Vector(1,0,0)));
    125124  this->setClassID(CL_PLAYER, "Player");
    126125  travelSpeed = 15.0;
Note: See TracChangeset for help on using the changeset viewer.