Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 1, 2008, 3:54:20 PM (16 years ago)
Author:
rgrieder
Message:
  • @everyone: Do not create a branch until I've added the svn:eol-style property correctly. Otherwise this would cost me another 4 hours or so when we want to merge back.
  • merged network branch back to trunk
  • I had to omit the changes from last evening concerning the line endings
  • might not work yet because of the line endings
  • @beni: script branch is the only branch still open. you probably will have to apply a patch because of inconsistent new lines
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/objects/Camera.cc

    r1293 r1502  
    6060  {
    6161    CameraHandler::getInstance()->releaseFocus(this);
     62    GraphicsEngine::getSingleton().getSceneManager()->getRootSceneNode()->removeAndDestroyChild(cameraNode_->getName());
    6263  }
    6364
     
    7576  void Camera::tick(float dt)
    7677  {
    77     if(this->positionNode_ != NULL) {
     78    if (this->positionNode_ != NULL)
     79    {
    7880      // this stuff here may need some adjustments
    79       Vector3 offset = this->positionNode_->getWorldPosition() - this->cameraNode_->getPosition();
    80       this->cameraNode_->translate(15*dt*offset);
     81      Vector3 offset = this->positionNode_->getWorldPosition() - this->cameraNode_->getWorldPosition();
     82      float coeff = 15.0f * dt;
     83      if (coeff > 1.0f)
     84        coeff = 1.0f;
    8185
    82       this->cameraNode_->setOrientation(Quaternion::Slerp(0.7, this->positionNode_->getWorldOrientation(), this->cameraNode_->getWorldOrientation(), false));
     86      this->cameraNode_->translate(coeff * offset);
     87
     88      this->cameraNode_->setOrientation(Quaternion::Slerp(7.0f * dt, this->positionNode_->getWorldOrientation(), this->cameraNode_->getWorldOrientation(), false));
    8389    }
    8490  }
Note: See TracChangeset for help on using the changeset viewer.