[bug?] Actor relative pitch rotation stuck in 90 degrees

I just got similar problem - Im creating a windmill. It should rotate bladed (through pitch) but whole mechanism with blades should rotate towards wind too (through yaw).

If you need to rotate only pitch you can use Add Local Rotation and that works fine. But when you try to rotate both together it will not work.

It took me while to find a solution but it’s not so complicated at end.

All you need to do is to use first AddLocalRotation to rotate blades and then get current rotation values and add/set z(yaw) rotation. I’m using setRelationLocationAndRotation as I’m also moving object around pivot point.

I hope this will help: