- Timestamp:
- Dec 15, 2008, 11:26:16 PM (16 years ago)
- 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 134 134 if (this->hasLocalController()) 135 135 { 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 } 142 145 143 146 this->yawRotation_ = this->zeroDegree_; … … 170 173 temp = -this->maxRotation_; 171 174 this->yawRotation_ = Degree(temp); 175 176 Pawn::rotateYaw(value); 172 177 } 173 178 … … 180 185 temp = -this->maxRotation_; 181 186 this->pitchRotation_ = Degree(temp); 187 188 Pawn::rotatePitch(value); 182 189 } 183 190 … … 190 197 temp = -this->maxRotation_; 191 198 this->rollRotation_ = Degree(temp); 199 200 Pawn::rotateRoll(value); 192 201 } 193 202 -
code/branches/objecthierarchy2/src/orxonox/objects/worldentities/pawns/Spectator.cc
r2428 r2478 51 51 52 52 this->speed_ = 200; 53 this->rotationSpeed_ = 3;54 53 55 54 this->yaw_ = 0; … … 88 87 { 89 88 SetConfigValue(speed_, 200.0f); 90 SetConfigValue(rotationSpeed_, 3.0f);91 89 } 92 90 … … 116 114 this->setVelocity(velocity * this->speed_); 117 115 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 } 121 122 122 123 this->yaw_ = this->pitch_ = this->roll_ = 0; … … 161 162 { 162 163 this->yaw_ = value.y; 164 165 ControllableEntity::rotateYaw(value); 163 166 } 164 167 … … 166 169 { 167 170 this->pitch_ = value.y; 171 172 ControllableEntity::rotatePitch(value); 168 173 } 169 174 … … 171 176 { 172 177 this->roll_ = value.y; 178 179 ControllableEntity::rotateRoll(value); 173 180 } 174 181 -
code/branches/objecthierarchy2/src/orxonox/objects/worldentities/pawns/Spectator.h
r2428 r2478 69 69 70 70 float speed_; 71 float rotationSpeed_;72 71 73 72 float yaw_;
Note: See TracChangeset
for help on using the changeset viewer.