Prototype/Source/Prototype/Private/Task_ActiveSearch.cpp
/* Random walk based search behavior.
*/
Random walk based search behavior.
Random walk based search behavior .
void AUSARAgent::RandWalkSearchStep()
{
    float bNewDir = FMath::FRand();
    if (bNewDir > RW_MOMENTUM) {
        FRotator turnDeg = FRotator(0, FMath::RandRange(-90, 90), 0);
        searchVector = turnDeg.RotateVector(searchVector);
    }
}
void AUSARAgent :: RandWalkSearchStep ( ) { float bNewDir = FMath :: FRand ( ) ; if ( bNewDir > RW_MOMENTUM ) { FRotator turnDeg = FRotator ( 0 , FMath :: RandRange ( -90 , 90 ) , 0 ) ; searchVector = turnDeg . RotateVector ( searchVector ) ; } }
Random walk based search behavior.
Random walk based search behavior .