Get middle of two rotators (math)

How can I get the middle of two rotators? I know I can use a lerp node with an alpha of 0.5, but I would like to understand what happens under the hood. If someone could tell me how to calculate this manually it would be much appreciated.

image for clarification: I have ROT A and ROT B and need to calucalte the ROT of the black object (which would euqal a lerpRot (ROT A, ROT B, 0.6)

I think this is basic programming/math thing and how specific functions works you should check elsewhere, for example on Linear interpolation - Wikipedia where you have even code samples. You have it in engine as function Lerp, but that’s right, is good to know how things works, for example for game performance - you can use more or less consuming function if you know how it works and what it doing in background. This is more important when you working with many instances like ai hordes, with loops etc.

Hi Vaheva, I think the way I formulated my question was a bit misleading. It’s not about how the lerp node works, but if you have two rotations…how can you calculate the “middle” rotation of it.

I know that I can get the middle rotation by using a lerp node with a fixed alpha of 0.5, but I assume you can calculate the middle of two rotators “directly”, I just don’t know how.

Hi again.

Maybe I still not understand :slight_smile: but it working in my case:

SM_MatPreviewMesh_3 is your ROT A, SM_MatPreviewMesh_4 is your ROT B and SM_MatPreviewMesh_5 is middle of two rotators.

In my test, I have left actor -90, right +90 and result rotation is 0. If not, I will check this tomorrow.