I'm creating an AI Director and need a way to change when the AI needs to pressure the player and when they need to move away. I've got a TArray of Objects and am checking the distance from the player. I'd like to either get the largest distance or the smallest distance.
I know this doesn't work:
operator comparer = PlayerTensionLevel > BackstageThreshold ? > : <;
Both of the variables used in the one line Bool are floats. I'm hoping that the comparer can be used in a situation like:
if(DistanceSquared(objectA, objectB) comparer _currentThresholdDistance){
_currentObject = objectA;
_currentThresholdDistance = DistanceSquared(objectA, objectB);
}