I am spawning actors (bp with mesh + light) along a Landscape spline using PCG.
So far so good, but i need to orient them to have them with a 0 Rotation along Z axis, but to keep the rotation on X and Y (because the meshes needs to be ortogonal to the landscape spline).
I’ve tried to use copy attributes to copy $Rotation.X and $Rotation.Y to temp variable and then, then RotZ to using absolute, then pasting back temp var to $Rotation.X and $Rotation.Y but this makes Unreal Engine instable and it crashes often when moving rescaling / translating the PCG volume.
Yeah, so I’m in 5.3 and having the exact same problem, like i said. Unreal crashes instantly when i hit debug on anything following the Rotation tampering. I used Noise, with Set to 0, but alas, crashes.
I think there might be a way to do this using rotators in PCG, but i don’t know how to and resources are, of course, scarce on how to do that
I know this post is old now and lots of updates have since come out to PCG - but there is a very simple way of achieving this without creating a custom blueprint node.
Simply use an Abs node with the Input Source set to your chosen rotation axis (e.g. $Rotation.Roll) and then plug the result in to both the A and B inputs of a Subtract node with both inputs set to the same rotation axis.
Then, just keep using your points as regular from there.
The Abs node inverts any value below 0, meaning what you’re essentially doing is just subtracting the rotation by itself - thus, the result will always be, making your rotation absolute but only on your selected axis.