Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 15, 2008, 11:26:16 PM (16 years ago)
Author:
landauf
Message:
  • Readded smooth camera movement (configurable through CameraPosition), works also with camera-position-changes
  • Added free mouse look (press left control key)
  • Made strength of boost-blur configurable
Location:
code/branches/objecthierarchy2/src/orxonox/objects/worldentities/pawns
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy2/src/orxonox/objects/worldentities/pawns/SpaceShip.cc

    r2256 r2478  
    134134        if (this->hasLocalController())
    135135        {
    136             this->yaw(this->yawRotation_ * dt);
    137             if (this->bInvertYAxis_)
    138                 this->pitch(Degree(-this->pitchRotation_ * dt));
    139             else
    140                 this->pitch(Degree( this->pitchRotation_ * dt));
    141             this->roll(this->rollRotation_ * dt);
     136            if (!this->isInMouseLook())
     137            {
     138                this->yaw(this->yawRotation_ * dt);
     139                if (this->bInvertYAxis_)
     140                    this->pitch(Degree(-this->pitchRotation_ * dt));
     141                else
     142                    this->pitch(Degree( this->pitchRotation_ * dt));
     143                this->roll(this->rollRotation_ * dt);
     144            }
    142145
    143146            this->yawRotation_   = this->zeroDegree_;
     
    170173            temp = -this->maxRotation_;
    171174        this->yawRotation_ = Degree(temp);
     175
     176        Pawn::rotateYaw(value);
    172177    }
    173178
     
    180185            temp = -this->maxRotation_;
    181186        this->pitchRotation_ = Degree(temp);
     187
     188        Pawn::rotatePitch(value);
    182189    }
    183190
     
    190197            temp = -this->maxRotation_;
    191198        this->rollRotation_ = Degree(temp);
     199
     200        Pawn::rotateRoll(value);
    192201    }
    193202
  • code/branches/objecthierarchy2/src/orxonox/objects/worldentities/pawns/Spectator.cc

    r2428 r2478  
    5151
    5252        this->speed_ = 200;
    53         this->rotationSpeed_ = 3;
    5453
    5554        this->yaw_ = 0;
     
    8887    {
    8988        SetConfigValue(speed_, 200.0f);
    90         SetConfigValue(rotationSpeed_, 3.0f);
    9189    }
    9290
     
    116114            this->setVelocity(velocity * this->speed_);
    117115
    118             this->yaw(Radian(this->yaw_ * this->rotationSpeed_));
    119             this->pitch(Radian(this->pitch_ * this->rotationSpeed_));
    120             this->roll(Radian(this->roll_ * this->rotationSpeed_));
     116            if (!this->isInMouseLook())
     117            {
     118                this->yaw(Radian(this->yaw_ * this->getMouseLookSpeed()));
     119                this->pitch(Radian(this->pitch_ * this->getMouseLookSpeed()));
     120                this->roll(Radian(this->roll_ * this->getMouseLookSpeed()));
     121            }
    121122
    122123            this->yaw_ = this->pitch_ = this->roll_ = 0;
     
    161162    {
    162163        this->yaw_ = value.y;
     164
     165        ControllableEntity::rotateYaw(value);
    163166    }
    164167
     
    166169    {
    167170        this->pitch_ = value.y;
     171
     172        ControllableEntity::rotatePitch(value);
    168173    }
    169174
     
    171176    {
    172177        this->roll_ = value.y;
     178
     179        ControllableEntity::rotateRoll(value);
    173180    }
    174181
  • code/branches/objecthierarchy2/src/orxonox/objects/worldentities/pawns/Spectator.h

    r2428 r2478  
    6969
    7070            float speed_;
    71             float rotationSpeed_;
    7271
    7372            float yaw_;
Note: See TracChangeset for help on using the changeset viewer.