- Timestamp:
- Nov 13, 2009, 12:06:22 PM (15 years ago)
- Location:
- code/branches/steering/src/orxonox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/steering/src/orxonox/controllers/NewHumanController.cc
r6055 r6058 59 59 crossHairOverlay_->show(); 60 60 61 // HACK: Define which objects are target table when considering the creator of an orxonox::Model61 // HACK: Define which objects are targetable when considering the creator of an orxonox::Model 62 62 this->targetMask_.exclude(ClassByString("BaseObject")); 63 63 this->targetMask_.include(ClassByString("WorldEntity")); … … 121 121 //std::cout << "X: " << static_cast<float>(this->currentYaw_)/2*-1+.5 << " Y: " << static_cast<float>(this->currentPitch_)/2*-1+.5 << endl; 122 122 123 Ogre::Ray mouseRay = HumanController::localController_s->getControllableEntity()->getCamera()->get Camera()->getCameraToViewportRay(static_cast<float>(this->currentYaw_)/2*-1+.5, static_cast<float>(this->currentPitch_)/2*-1+.5);123 Ogre::Ray mouseRay = HumanController::localController_s->getControllableEntity()->getCamera()->getOgreCamera()->getCameraToViewportRay(static_cast<float>(this->currentYaw_)/2*-1+.5, static_cast<float>(this->currentPitch_)/2*-1+.5); 124 124 125 125 rsq->setRay(mouseRay); … … 170 170 } 171 171 */ 172 return this->controllableEntity_->getWorldPosition() + (this->controllableEntity_->getWorldOrientation() * Vector3::NEGATIVE_UNIT_Z * 100);173 //return this->controllableEntity_->getWorldPosition() + (this->controllableEntity_->getCamera()->get Camera()->getOrientation() * Vector3::NEGATIVE_UNIT_Z);172 return this->controllableEntity_->getWorldPosition() + (this->controllableEntity_->getWorldOrientation() * Vector3::NEGATIVE_UNIT_Z * 800); 173 //return this->controllableEntity_->getWorldPosition() + (this->controllableEntity_->getCamera()->getOgreCamera()->getOrientation() * Vector3::NEGATIVE_UNIT_Z); 174 174 } 175 175 -
code/branches/steering/src/orxonox/graphics/Camera.h
r6033 r6058 52 52 void releaseFocus(); 53 53 54 inline Ogre::Camera* get Camera()54 inline Ogre::Camera* getOgreCamera() 55 55 { return this->camera_; } 56 56 -
code/branches/steering/src/orxonox/weaponsystem/WeaponMode.cc
r6055 r6058 206 206 { 207 207 Vector3 muzzleDirection(controller->getTarget() - this->muzzlePosition_); 208 this->muzzleOrientation_ = this->weapon_->getWorldOrientation() * (this->weapon_->getWorldOrientation() * WorldEntity::FRONT).getRotationTo(muzzleDirection);208 this->muzzleOrientation_ = (this->weapon_->getWorldOrientation() * WorldEntity::FRONT).getRotationTo(muzzleDirection) * this->weapon_->getWorldOrientation(); 209 209 } 210 210 else
Note: See TracChangeset
for help on using the changeset viewer.