Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 28, 2013, 3:58:20 PM (11 years ago)
Author:
wroennin
Message:

Radar.cc: new function call, detectionlimit 10000→1000 ; Math.cc: new function get3DProjection; HUDTemplates.oxo: new HUDRadar

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/radarDreiD/src/modules/overlays/hud/HUDRadar.cc

    r9667 r9719  
    6464        this->shapeMaterials_[RadarViewable::Triangle] = "RadarTriangle.png";
    6565        this->shapeMaterials_[RadarViewable::Square]   = "RadarSquare.png";
    66         this->setDetectionLimit( 10000.0f );
     66        this->setDetectionLimit( 1000.0f );
    6767        this->owner_ = 0;
    6868    }
     
    169169
    170170            // 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_);
    172173            coord *= math::pi / 3.5f; // small adjustment to make it fit the texture
    173174            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.