# \[PCG\] Transform rotation only on the Z axis

**URL:** <https://forums.unrealengine.com/t/pcg-transform-rotation-only-on-the-z-axis/1339711>\
**Category:** Blueprint\
**Tags:** unreal-engine\
**Created:** [October 21, 2023, 11:40am UTC](https://forums.unrealengine.com/t/pcg-transform-rotation-only-on-the-z-axis/1339711 "2023-10-21T11:40:28Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![DaftAlexPunk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DaftAlexPunk](https://forums.unrealengine.com/u/DaftAlexPunk)\
**Post date:** [October 21, 2023, 11:40am UTC](https://forums.unrealengine.com/t/pcg-transform-rotation-only-on-the-z-axis/1339711/1 "2023-10-21T11:40:28Z")

</div>

Hi,

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).

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/4/7/14773d8fa04496b66c25645e9fa61d04c69cdb1d.jpeg)

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.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/d/d/add127b9198f0e28486d20da176b8d8c2fecc55c.png)  
In the screenshot above, connecting the last copy attribute node on the bottom right to the actor spawner makes unreal (5.3.1) crashes:

`Assertion failed: IsRotationNormalized() [File:D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Math\TransformVectorized.h] [Line: 1300]`

There must be an easiest way or a way that works

---

<div class="post-metadata">

**Author:** ![Evilnescu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Evilnescu](https://forums.unrealengine.com/u/Evilnescu)\
**Post date:** [March 15, 2024, 9:23am UTC](https://forums.unrealengine.com/t/pcg-transform-rotation-only-on-the-z-axis/1339711/2 "2024-03-15T09:23:28Z")

</div>

Hi there! I have exactly the same problem. Any luck with this?

---

<div class="post-metadata">

**Author:** ![DaftAlexPunk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DaftAlexPunk](https://forums.unrealengine.com/u/DaftAlexPunk)\
**Post date:** [March 16, 2024, 10:10am UTC](https://forums.unrealengine.com/t/pcg-transform-rotation-only-on-the-z-axis/1339711/3 "2024-03-16T10:10:40Z")

</div>

No, and I haven’t looked further to it, I was expecting an answer from the PCG community 🙂

---

<div class="post-metadata">

**Author:** ![Evilnescu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Evilnescu](https://forums.unrealengine.com/u/Evilnescu)\
**Post date:** [March 18, 2024, 10:54am UTC](https://forums.unrealengine.com/t/pcg-transform-rotation-only-on-the-z-axis/1339711/4 "2024-03-18T10:54:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![FireGM](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FireGM](https://forums.unrealengine.com/u/FireGM)\
**Post date:** [March 18, 2024, 6:30pm UTC](https://forums.unrealengine.com/t/pcg-transform-rotation-only-on-the-z-axis/1339711/5 "2024-03-18T18:30:11Z")

</div>

You can’t just change the rotation because it’s stored in a transform. You need to create PCGBlueprintElement and change it inside.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/0/d/80d69c15b24becaae0bf900bf0547f5512b1e8db.jpeg)  
This is what I used to generate stairs  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/7/2/a72df72bba0ca59208bfa4aa6d13e84be094bb42.jpeg)

---

<div class="post-metadata">

**Author:** ![DaftAlexPunk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DaftAlexPunk](https://forums.unrealengine.com/u/DaftAlexPunk)\
**Post date:** [April 20, 2024, 3:22pm UTC](https://forums.unrealengine.com/t/pcg-transform-rotation-only-on-the-z-axis/1339711/6 "2024-04-20T15:22:10Z")

</div>

Thanks for your answer !

I tried your approach by:  
Create a PCGBlueprintElement, and on that PCGBE I’ve overriden the point loop body

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/8/0/38077382526c7df7169ef70c57518155e5e68b7f.png)

Then on my PCG blueprint, i’m calling that Blueprint :

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/3/e/f3e6c39e47c14dd81c610ba846074d89f7453f21.png)  
but when I debug and inspect,  
i can see points in  
i do see nothing comes out

And even when I shortcut the PointLoop Body like below, I don’t get any point out:  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/3/3/d33f32ba902b604b7d790a0bf42fba47628e1c87.png)

---

<div class="post-metadata">

**Author:** ![iHad169](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@iHad169](https://forums.unrealengine.com/u/iHad169)\
**Post date:** [June 9, 2024, 4:06pm UTC](https://forums.unrealengine.com/t/pcg-transform-rotation-only-on-the-z-axis/1339711/7 "2024-06-09T16:06:46Z")

</div>

Me Too  
But I finded we need create “Execute with Context” function  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/3/a/c3a3832d5860f8824d7866903661b261e03a83d1.png)  
This is my copy code successed

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/f/f/5ff322e76e459bfd4a5e2ff008050cb6ca449461.png)

> **[PCG override ExecuteWithContext boilerplate posted by fastchaos | blueprintUE...](https://blueprintue.com/blueprint/7a9jbw2o/)**
>
> No description provided

You can try try it

> **[AbsoluteRotationZ.uasset](https://drive.google.com/file/d/1TR1QryMY0lbD-mfYB6Xa7nJgf1QGL0MC/view?usp=sharing)**
>
> Google Drive file.

---

<div class="post-metadata">

**Author:** ![AsdPtion](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AsdPtion](https://forums.unrealengine.com/u/AsdPtion)\
**Post date:** [December 23, 2024, 8:24am UTC](https://forums.unrealengine.com/t/pcg-transform-rotation-only-on-the-z-axis/1339711/8 "2024-12-23T08:24:54Z")

</div>

omg, there is a more easy solution. In projection node just remove checkbox from project rotation. Thats all.

---

<div class="post-metadata">

**Author:** ![EhrixWasTaken](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EhrixWasTaken](https://forums.unrealengine.com/u/EhrixWasTaken)\
**Post date:** [December 17, 2025, 3:49pm UTC](https://forums.unrealengine.com/t/pcg-transform-rotation-only-on-the-z-axis/1339711/9 "2025-12-17T15:49:37Z")

</div>

Hi there!

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.

Hope this is useful for someone!

 ![AbsRotation](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/d/3/5d36e7616a82991152207977e97b3f0e643d161b.png)

/Ehrix
