I am working on a crank like object, and its relative rotation on the y-axis should align to the world location of an external mesh actor. The current Blueprint code is working fine, as long as the target actor has no rotation.
How to consider the local space orientation of the y-axis of the target, in order align rotation on this axis by the world location of the source?
Have you tried the “get look at rotation” node
Then maybe just call a “move component to” to rotate the mesh
I tried “find look at rotation” before, but was not able to get the rotation value in degrees from that.
The current code simply calculates the angle in degrees of a line beginning from the central point of a circle (y-axis) and another point next to that circle (the external actor location). This is done on a XZ plane by subtracting the target location from souce location. The question is now how to rotate that plane with the target actor rotation? I think this is done by the ‘right vector’ or other directional vectors.
I could solve the issue by projecting the XZ plane to local space of the target mesh