Check if actor's Yaw Value is between a - b degrees

I can check if it is between 10-70 or 100-160 or 250-310 degrees and i get correct values. But when a > b, it becomes problem for me. As example, how can i check if my character’s Yaw Rotation Value is between 310-10 degrees? Because In Range(float) function doesnt work when minimum value is greater than maximum value. ( I use Clamp Axis function to convert all rotations from -180/180 to 0/360, I use In Range(float) to compare)

You could write a function

It just swaps over the values depending on which is larger…

image

As i understood, you connect min to max and max to min when min > max. But if you do this, wouldnt result be like this? Maybe i should connect “not” to In Range(float) result when min > max?

Trouble is, it’s not really to do with which way around the numbers are, it’s related to how you interpret the question.

I mean, ‘is X between 5 and 10’ is the same as ‘is X between 10 and 5’?

I think you just have to write your own function that knows what you mean :slight_smile: