Changeset 2956 for code/branches/map/src/orxonox/objects/RadarViewable.cc
- Timestamp:
- May 7, 2009, 4:44:12 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/map/src/orxonox/objects/RadarViewable.cc
r2942 r2956 52 52 , MapEntity_(NULL) 53 53 , line_(NULL) 54 , isHumanShip_(false) 54 55 { 55 56 RegisterRootObject(RadarViewable); … … 69 70 { 70 71 delete MapNode_; 72 MapNode_=0; 71 73 delete MapEntity_; 74 MapEntity_=0; 75 delete line_; 76 line_=0; 77 delete LineNode_; 78 LineNode_=0; 72 79 } 73 80 … … 91 98 92 99 this->MapNode_->attachObject( this->MapEntity_ ); 93 this->MapNode_->attachObject( this->line_ ); 100 101 this->LineNode_ = this->MapNode_->createChildSceneNode(); 102 this->LineNode_->attachObject( this->line_ ); 94 103 } 95 104 else … … 106 115 this->MapNode_->translate( this->getRVOrientedVelocity(), (Ogre::Node::TransformSpace)3 ); 107 116 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); 110 122 } 111 123 }
Note: See TracChangeset
for help on using the changeset viewer.