Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1465


Ignore:
Timestamp:
May 28, 2008, 11:12:18 PM (16 years ago)
Author:
rgrieder
Message:
  • fixed bug with shaking camera
  • made part of camera adjustments more fps independent
  • fixed a bug in KeyBinder
Location:
code/branches/network/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network/src/core/InputManager.cc

    r1461 r1465  
    560560      case IS_NODETECT:
    561561        _restoreState();
     562        keysDown_.clear();
     563        mouseButtonsDown_.clear();
     564        joyStickButtonsDown_[0].clear();
    562565        state_ = IS_NODETECT;
    563566        stateRequest_ = savedState_;
  • code/branches/network/src/core/KeyBinder.cc

    r1461 r1465  
    341341      paramCommands_[i] = cmds[i];
    342342    paramCommands_[i] = command;
    343     delete[] cmds;
     343    if (nParamCommands_ > 1)
     344      delete[] cmds;
    344345    return true;
    345346  }
  • code/branches/network/src/orxonox/objects/Camera.cc

    r1409 r1465  
    7676  void Camera::tick(float dt)
    7777  {
    78     if(this->positionNode_ != NULL) {
     78    if (this->positionNode_ != NULL)
     79    {
    7980      // this stuff here may need some adjustments
    80       Vector3 offset = this->positionNode_->getWorldPosition() - this->cameraNode_->getPosition();
    81       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;
    8285
    83       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));
    8489    }
    8590  }
Note: See TracChangeset for help on using the changeset viewer.