Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 20, 2007, 6:55:17 PM (16 years ago)
Author:
nicolasc
Message:

added a test crosshair — same hack as blinky

Location:
code/branches/FICN/src/orxonox/objects
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/src/orxonox/objects/SpaceShip.cc

    r660 r661  
    165165        // END CREATING BLINKING LIGHTS
    166166
     167        // START of testing crosshair
     168        this->crosshairNear_.setBillboardSet("Orxonox/Crosshair", ColourValue(1.0, 1.0, 0.0), 1);
     169        this->crosshairFar_.setBillboardSet("Orxonox/Crosshair", ColourValue(1.0, 1.0, 0.0), 1);
     170
     171        this->chNearNode_ = this->getNode()->createChildSceneNode(this->getName() + "near", Vector3(50.0, 0.0, 0.0));
     172        this->chNearNode_->setInheritScale(false);
     173        this->chFarNode_ = this->getNode()->createChildSceneNode(this->getName() + "far", Vector3(200.0, 0.0, 0.0));
     174        this->chFarNode_->setInheritScale(false);
     175
     176        this->chNearNode_->attachObject(this->crosshairNear_.getBillboardSet());
     177        this->chNearNode_->setScale(0.2, 0.2, 0.2);
     178
     179        this->chFarNode_->attachObject(this->crosshairFar_.getBillboardSet());
     180        this->chFarNode_->setScale(0.4, 0.4, 0.4);
     181
     182        // END of testing crosshair
    167183
    168184/*
  • code/branches/FICN/src/orxonox/objects/SpaceShip.h

    r647 r661  
    5656            Ogre::SceneNode* greenNode_;
    5757            float blinkTime_;
     58
     59            BillboardSet crosshairNear_;
     60            BillboardSet crosshairFar_;
     61            Ogre::SceneNode* chNearNode_;
     62            Ogre::SceneNode* chFarNode_;
    5863
    5964            float timeToReload_;
Note: See TracChangeset for help on using the changeset viewer.