Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 7, 2009, 4:44:12 PM (16 years ago)
Author:
Naaduun
Message:

added rotate and zoom to map. using static mapscenemanager now

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/map/src/orxonox/objects/RadarViewable.cc

    r2942 r2956  
    5252        , MapEntity_(NULL)
    5353        , line_(NULL)
     54        , isHumanShip_(false)
    5455    {
    5556        RegisterRootObject(RadarViewable);
     
    6970    {
    7071        delete MapNode_;
     72        MapNode_=0;
    7173        delete MapEntity_;
     74        MapEntity_=0;
     75        delete line_;
     76        line_=0;
     77        delete LineNode_;
     78        LineNode_=0;
    7279    }
    7380
     
    9198
    9299            this->MapNode_->attachObject( this->MapEntity_ );
    93             this->MapNode_->attachObject( this->line_ );
     100
     101            this->LineNode_ = this->MapNode_->createChildSceneNode();
     102            this->LineNode_->attachObject( this->line_ );
    94103        }
    95104        else
     
    106115            this->MapNode_->translate( this->getRVOrientedVelocity(), (Ogre::Node::TransformSpace)3 );
    107116            this->MapNode_->setOrientation( this->getWorldEntity()->getOrientation() );
    108 Vector3 v = this->getRVWorldPosition();
    109             this->line_->setPoint(1, Vector3(0,v.y,0) );
     117//Vector3 v = this->getRVWorldPosition();
     118            //this->line_->setPoint(1, Vector3(0,v.y,0) );
     119            this->line_->setPoint(1, Vector3(0, -this->getRVWorldPosition().y ,0) );
     120            this->line_->update();
     121            this->LineNode_->setDirection(Vector3::UNIT_Y,Ogre::Node::TS_WORLD,Vector3::UNIT_Y);
    110122        }
    111123    }
Note: See TracChangeset for help on using the changeset viewer.