Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 27, 2015, 10:37:59 PM (10 years ago)
Author:
gania
Message:

cut smoothness, gained performance

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/campaignHS15/src/orxonox/controllers/FightingController.cc

    r10877 r10880  
    126126        Vector3 diffUnit = diffVector/diffLength;
    127127
    128         bool bTargetIsLookingAtThis = CommonController::isLooking ( this->target_, getControllableEntity(), math::pi/10.0f );
     128        bool bTargetIsLookingAtThis = CommonController::isLooking ( this->target_, getControllableEntity(), math::pi/20.0f );
    129129       
    130130        //too far? well, come closer then
     
    191191        );
    192192        Vector3 projection = randVector->dotProduct( diffUnit )* diffUnit;
    193         *randVector -= projection;
    194         target += *randVector;
     193        Vector3 randV = *randVector;
     194        delete randVector;
     195        randV -= projection;
     196        target += randV;
    195197        this->setTargetPosition( thisPosition + target );
    196198    }
Note: See TracChangeset for help on using the changeset viewer.