- Timestamp:
- Oct 28, 2013, 3:58:20 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/radarDreiD/src/modules/overlays/hud/HUDRadar.cc
r9667 r9719 64 64 this->shapeMaterials_[RadarViewable::Triangle] = "RadarTriangle.png"; 65 65 this->shapeMaterials_[RadarViewable::Square] = "RadarSquare.png"; 66 this->setDetectionLimit( 1000 0.0f );66 this->setDetectionLimit( 1000.0f ); 67 67 this->owner_ = 0; 68 68 } … … 169 169 170 170 // calc position on radar... 171 Vector2 coord = get2DViewcoordinates(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, this->owner_->getOrientation() * WorldEntity::UP, wePointer->getWorldPosition()); 171 //Vector2 coord = get2DViewcoordinates(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, this->owner_->getOrientation() * WorldEntity::UP, wePointer->getWorldPosition()); 172 Vector2 coord = get3DProjection(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, wePointer->getWorldPosition(), 0.6435011, detectionLimit_); 172 173 coord *= math::pi / 3.5f; // small adjustment to make it fit the texture 173 174 it->second->setPosition((1.0f + coord.x - size) * 0.5f, (1.0f - coord.y - size) * 0.5f);
Note: See TracChangeset
for help on using the changeset viewer.