Help needed on how to use use a vector to align a mesh on it's yaw and pitch

Hey,
I have a conceptual grasp of what I want to do - I want to create a vector using the previous and current location values, then use that vector so that each Tick, the mesh yaw and pitch are modulated by the vector changing each tick.

However, I don’t quite get if I’m supposed to be using rotators or x vectors or what have you - so any pointers would be really appreciated on this.

Thanks!

There are multiple functions to do that.

For eg. Rotation from XY needs forward and right vector (both normalized), then as result it gives rotator value. Use that to set mesh rotation.
There are also functions to make rotation from single vector, but those tend to have areas of very unstable values (around poles if you think about resulting rotator as spherical coordinate)
You also can use “get look at rotation”.

This all is kind of hard to use in unreal because of its actor hierarchical structure, if you rotate single mesh then its not a problem, but if mesh is inside blueprint somewhere in components hierarchy, best way is to draw trace lines ans debug and manually adjust values (like adding 90deg to yaw, negating one of vectors etc.).

Hey man, thanks for your reply, totally helpful, I didn’t catch the reply notice so I apologize for the delay.