More appropriate "Find Look at Rotation" for 2D?

Is there a more appropriate “Find Look at Rotation” for 2D? I only really need the Y (I’ve set for Actors X is still forward but along Y).

A bit unclear regarding what is really needed :thinking:


For 2d it’s a matter of subtracting one v2 from another v2 - this gives you direction one can, optionally, translate into degrees with Atan2 and then further rotate if necessary. Or, depending on what we’re working with, you can ignore one component of the v3 and still Find Look at Rotation, albeit on a single plane only.

On the find look at rotation, you can split the return pin and only use the axis you need

Had to do some swizzeling but seems to work, thanks.

(Scene Y across Z up)

This is what I ended up with.

There is a problem and can’t find what’s causing it.

If I plug in only my 2DLookAtDeg into the Make Rotator Y Pitch it works fine. But when I try using FInterp between my current Y float and the Target Deg float it doesn’t want to work properly. Any suggestions?

There’s a “find look at rotation” function you can call and just plug in 2 actors locations… have you tried using this?

Your Atan2 XY is the wrong way around - that’s whay you had to swizzle the vectors. Regarding interpolation, are we sure the result sets rotation of the same actor it is sampling?

But I’m not sure what this is for, so I might be off with the comment. I initially thought you needed a pure 3d->2d rotation but it seems this gets translated back into a rotator again. Can’t picture it in my head, tis all. :innocent:

Try RInterp instead of FInterp to,

ive had issues in the past and i forget if this was the reason but when interping a rotator 180 +1 would go to -179, where as with a float it’ll be 181

1 Like