I have two actors in a level and I want to get the value that one of them would have to rotate in order to directly face the other. For example, if the actor was already facing the other one, the yaw value would be zero. If the other actor was standing to the looker’s left, the yaw would be either 90 or -90 (it could also be 270 or -270, but I want to get the value closest to zero). I’ve included a picture of my logic below.
However, the rotation result returns some values that are incorrect. In one case the result might be 245 (I don’t know how to get the value closest to zero at the moment), but if the player rotates a bit more in one direction, the value will stay at 245. It seems that my current logic is getting rotation results dependent on where the actors are in the world rather than relative to each other. How do I change my blueprint logic so that I can get the rotation difference I need?